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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2. import re
  3.  
  4. class ReutersJa(BasicNewsRecipe):
  5.  
  6.     title = 'Reuters(Japan)'
  7.     description = 'Global news in Japanese'
  8.     __author__ = 'Hiroshi Miura'
  9.     use_embedded_content   = False
  10.     language = 'ja'
  11.     max_articles_per_feed = 10
  12.     remove_javascript = True
  13.  
  14.     feeds = [ ('Top Stories', 'http://feeds.reuters.com/reuters/JPTopNews?format=xml'),
  15.                   ('World News', 'http://feeds.reuters.com/reuters/JPWorldNews?format=xml'),
  16.                   ('Business News', 'http://feeds.reuters.com/reuters/JPBusinessNews?format=xml'),
  17.                   ('Technology News', 'http://feeds.reuters.com/reuters/JPTechnologyNews?format=xml'),
  18.                   ('Oddly Enough News', 'http://feeds.reuters.com/reuters/JPOddlyEnoughNews?format=xml')
  19.          ]
  20.  
  21.     remove_tags_before = {'class':"article primaryContent"}
  22.     remove_tags = [ dict(id="banner"),
  23.                     dict(id="autilities"),
  24.                     dict(id="textSizer"),
  25.                     dict(id="shareFooter"),
  26.                     dict(id="relatedNews"),
  27.                     dict(id="editorsChoice"),
  28.                     dict(id="ecArticles"),
  29.                     {'class':"secondaryContent"},
  30.                     {'class':"module"},
  31.                      ]
  32.     remove_tags_after = {'class':"assetBuddy"}
  33.  
  34.     def print_version(self, url):
  35.         m = re.search('(.*idJPJAPAN-[0-9]+)', url)
  36.         return m.group(0)+'?sp=true'
  37.  
  38.