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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
  3.  
  4. '''
  5. Fetch FTD.
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10.  
  11. class FTDe(BasicNewsRecipe):
  12.  
  13.     title = 'FTD'
  14.     description = 'Financial Times Deutschland'
  15.     __author__ = 'Oliver Niesner'
  16.     use_embedded_content   = False
  17.     timefmt = ' [%d %b %Y]'
  18.     language = 'de'
  19.     max_articles_per_feed = 40
  20.     no_stylesheets = True
  21.  
  22.     remove_tags = [dict(id='navi_top'),
  23.            dict(id='topbanner'),
  24.            dict(id='seitenkopf'),
  25.            dict(id='BoxA-0-0-0'),
  26.            #dict(id='BoxA-2-0-0'),
  27.            dict(id='footer'),
  28.            dict(id='rating_open'),
  29.            dict(id='ADS_Top'),
  30.            dict(id='spinner'),
  31.            dict(id='ftd-contentad'),
  32.            dict(id='ftd-promo'),
  33.            dict(id='nava-50009007-1-0'),
  34.            dict(id='navli-50009007-1-0'),
  35.            dict(id='Box5000534-0-0-0'),
  36.            dict(id='ExpV-1-0-0-1'),
  37.            dict(id='ExpV-1-0-0-0'),
  38.            dict(id='PollExpV-2-0-0-0'),
  39.            dict(id='starRating'),
  40.            dict(id='saveRating'),
  41.            dict(id='yLayer'),
  42.            dict(id='yTip'),
  43.            dict(id='ftdCookieStorage'),
  44.            dict(id='ADS_Middle1'),
  45.            #dict(id='IDMS_ajax_chart_price_information_table'),
  46.            dict(id='ivwimg'),
  47.            dict(name='span', attrs={'class':'rsaquo'}),
  48.            dict(name='p', attrs={'class':'zwischenhead'}),
  49.            dict(name='ul', attrs={'class':'list'}),
  50.            dict(name='ul', attrs={'class':'nav'}),
  51.            dict(name='p', attrs={'class':'articleOptionHead'}),
  52.            dict(name='p', attrs={'class':'articleOptionFoot'}),
  53.            dict(name='p', attrs={'class':'moreInfo'}),
  54.            dict(name='div', attrs={'class':'chartBox'}),
  55.            dict(name='div', attrs={'class':'ratingOpt starRatingContainer articleOptionFootFrame'}),
  56.            dict(name='div', attrs={'class':'box boxArticleBasic boxComments boxTransparent'}),
  57.            dict(name='div', attrs={'class':'box boxNavTabs'}),
  58.            dict(name='div', attrs={'class':'boxMMRgtLow'}),
  59.            dict(name='span', attrs={'class':'vote_455857'}),
  60.            dict(name='div', attrs={'class':'relatedhalb'}),
  61.            dict(name='div', attrs={'class':'box boxListScrollOutline'}),
  62.            dict(name='div', attrs={'class':'box boxPhotoshow boxImgWide'}),
  63.            dict(name='div', attrs={'class':'box boxTeaser boxPhotoshow boxImgWide'}),
  64.            dict(name='div', attrs={'class':'box boxTeaser'}),
  65.            dict(name='div', attrs={'class':'tagCloud'}),
  66.            dict(name='div', attrs={'class':'pollView'}),
  67.            dict(name='div', attrs={'class':'box boxArticleBasic boxNavTabsOutline'}),
  68.            dict(name='div', attrs={'class':'ftdHpNav'}),
  69.            dict(name='div', attrs={'class':'ftdHead'}),
  70.            dict(name='div', attrs={'class':'ftdTicker'}),
  71.            dict(name='div', attrs={'class':'ftdBreadcrumb'}),
  72.            dict(name='div', attrs={'class':'bpoll'}),
  73.            dict(name='div', attrs={'class':'pollokknopf'}),
  74.            dict(name='div', attrs={'class':'videohint'}),
  75.            dict(name='div', attrs={'class':'videoshadow'}),
  76.            dict(name='div', attrs={'class':'boxresp videorahmen'}),
  77.            dict(name='div', attrs={'class':'boxresp'}),
  78.            dict(name='div', attrs={'class':'abspielen'}),
  79.            dict(name='div', attrs={'class':'wertungoben'}),
  80.            dict(name='div', attrs={'class':'artikelfuss'}),
  81.            dict(name='a', attrs={'class':'rating'}),
  82.            dict(name='a', attrs={'href':'#rt'}),
  83.            dict(name='div', attrs={'class':'articleOptionFootFrame'}),
  84.            dict(name='div', attrs={'class':'artikelsplitfaq'})]
  85.     #remove_tags_after = [dict(name='a', attrs={'class':'more'})]
  86.  
  87.     feeds =  [ ('Finanzen', 'http://www.ftd.de/rss2/finanzen/maerkte'),
  88.            ('Meinungshungrige', 'http://www.ftd.de/rss2/meinungshungrige'),
  89.            ('Unternehmen', 'http://www.ftd.de/rss2/unternehmen'),
  90.            ('Politik', 'http://www.ftd.de/rss2/politik'),
  91.            ('Karriere_Management', 'http://www.ftd.de/rss2/karriere-management'),
  92.            ('IT_Medien', 'http://www.ftd.de/rss2/it-medien'),
  93.            ('Wissen', 'http://www.ftd.de/rss2/wissen'),
  94.            ('Sport', 'http://www.ftd.de/rss2/sport'),
  95.            ('Auto', 'http://www.ftd.de/rss2/auto'),
  96.            ('Lifestyle', 'http://www.ftd.de/rss2/lifestyle')
  97.  
  98.          ]
  99.  
  100.  
  101.     def print_version(self, url):
  102.         return url.replace('.html', '.html?mode=print')
  103.