home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / hira.recipe < prev    next >
Encoding:
Text File  |  2011-09-09  |  2.2 KB  |  53 lines

  1. # coding=utf-8
  2.  
  3. from calibre.web.feeds.recipes import BasicNewsRecipe
  4.  
  5. class Hira(BasicNewsRecipe):
  6.     title                  = 'Hira'
  7.     __author__             = 'thomass'
  8.     description            = '┘à╪¼┘ä╪⌐ ╪¡╪▒╪º╪í ┘à╪¼┘ä╪⌐ ╪╣┘ä┘à┘è╪⌐ ╪½┘é╪º┘ü┘è╪⌐ ┘ü┘â╪▒┘è╪⌐ ╪¬╪╡╪»╪▒ ┘â┘ä ╪┤┘ç╪▒┘è┘å╪î ╪¬╪╣┘å┘ë ╪¿╪º┘ä╪╣┘ä┘ê┘à ╪º┘ä╪╖╪¿┘è╪╣┘è╪⌐ ┘ê╪º┘ä╪Ñ┘å╪│╪º┘å┘è╪⌐ ┘ê╪º┘ä╪º╪¼╪¬┘à╪º╪╣┘è╪⌐ ┘ê╪¬╪¡╪º┘ê╪▒ ╪ú╪│╪▒╪º╪▒ ╪º┘ä┘å┘ü╪│ ╪º┘ä╪¿╪┤╪▒┘è╪⌐ ┘ê╪ó┘ü╪º┘é ╪º┘ä┘â┘ê┘å ╪º┘ä╪┤╪º╪│╪╣╪⌐ ╪¿╪º┘ä┘à┘å╪╕┘ê╪▒ ╪º┘ä┘é╪▒╪ó┘å┘è ╪º┘ä╪Ñ┘è┘à╪º┘å┘è ┘ü┘è ╪¬╪ó┘ä┘ü ┘ê╪¬┘å╪º╪│╪¿ ╪¿┘è┘å ╪º┘ä╪╣┘ä┘à ┘ê╪º┘ä╪Ñ┘è┘à╪º┘å╪î ┘ê╪º┘ä╪╣┘é┘ä ┘ê╪º┘ä┘é┘ä╪¿╪î ┘ê╪º┘ä┘ü┘â╪▒ ┘ê╪º┘ä┘ê╪º┘é╪╣.'
  9.     oldest_article         = 63
  10.     max_articles_per_feed  = 50
  11.     no_stylesheets         = True
  12.     #delay                 = 1
  13.     use_embedded_content   = False
  14.     encoding               = 'utf-8'
  15.     publisher              = 'thomass'
  16.     category               = 'News'
  17.     language               = 'ar'
  18.     publication_type       = 'magazine'
  19.     extra_css              = ' .title-detail-wrap{ font-weight: bold ;text-align:right;color:#FF0000;font-size:25px}.title-detail{ font-family:sans-serif;text-align:right;}  '
  20.  
  21.  
  22.     conversion_options = {
  23.                             'tags'            : category
  24.                             ,'language'        : language
  25.                             ,'publisher'       : publisher
  26.                             ,'linearize_tables': True
  27.                             ,'base-font-size':'10'
  28.                          }
  29.     #html2lrf_options = []
  30.     keep_only_tags    = [
  31.                             dict(name='div', attrs={'class':['title-detail']})
  32.                         ]
  33.  
  34.     remove_tags       = [
  35.                             dict(name='div', attrs={'class':['clear', 'bbsp']}),
  36.                         ]
  37.  
  38.     remove_attributes = [
  39.                             'width','height'
  40.                         ]
  41.  
  42.     feeds             = [
  43.                             (u'╪¡╪▒╪º╪í', 'http://open.dapper.net/services/hira'),
  44.                         ]
  45.  
  46.     def preprocess_html(self, soup):
  47.         for alink in soup.findAll('a'):
  48.             if alink.string is not None:
  49.                tstr = alink.string
  50.                alink.replaceWith(tstr)
  51.         return soup
  52.  
  53.