New recipes for the Financial Times (Deutschland) and ZDNet security, thanks to Oliver Niesner

This commit is contained in:
Kovid Goyal 2009-01-04 09:53:40 -08:00
parent 9b53b3d1c5
commit f0df2ade62
3 changed files with 98 additions and 1 deletions

View File

@ -20,7 +20,7 @@ recipe_modules = ['recipe_' + r for r in (
'science_news', 'the_nation', 'lrb', 'harpers_full', 'liberation', 'science_news', 'the_nation', 'lrb', 'harpers_full', 'liberation',
'linux_magazine', 'telegraph_uk', 'utne', 'sciencedaily', 'forbes', 'linux_magazine', 'telegraph_uk', 'utne', 'sciencedaily', 'forbes',
'time_magazine', 'endgadget', 'fudzilla', 'nspm_int', 'nspm', 'pescanik', 'time_magazine', 'endgadget', 'fudzilla', 'nspm_int', 'nspm', 'pescanik',
'spiegel_int', 'themarketticker', 'tomshardware', 'xkcd', 'spiegel_int', 'themarketticker', 'tomshardware', 'xkcd', 'ftd', 'zdnet',
)] )]
import re, imp, inspect, time, os import re, imp, inspect, time, os

View File

@ -0,0 +1,50 @@
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
'''
Fetch FTD.
'''
from calibre.web.feeds.news import BasicNewsRecipe
class FTheiseDe(BasicNewsRecipe):
title = 'FTD'
description = 'Financial Times Deutschland'
__author__ = 'Oliver Niesner'
use_embedded_content = False
timefmt = ' [%d %b %Y]'
max_articles_per_feed = 40
no_stylesheets = True
remove_tags = [dict(id='navi_top'),
dict(id='topbanner'),
dict(id='seitenkopf'),
dict(id='footer'),
dict(id='rating_open'),
dict(id='ADS_Top'),
dict(id='ADS_Middle1'),
#dict(id='IDMS_ajax_chart_price_information_table'),
dict(id='ivwimg'),
dict(name='span', attrs={'class':'rsaquo'}),
dict(name='p', attrs={'class':'zwischenhead'}),
dict(name='div', attrs={'class':'chartBox'}),
dict(name='span', attrs={'class':'vote_455857'}),
dict(name='div', attrs={'class':'relatedhalb'}),
dict(name='div', attrs={'class':'bpoll'}),
dict(name='div', attrs={'class':'pollokknopf'}),
dict(name='div', attrs={'class':'videohint'}),
dict(name='div', attrs={'class':'videoshadow'}),
dict(name='div', attrs={'class':'boxresp videorahmen'}),
dict(name='div', attrs={'class':'boxresp'}),
dict(name='div', attrs={'class':'abspielen'}),
dict(name='div', attrs={'class':'wertungoben'}),
dict(name='div', attrs={'class':'artikelfuss'}),
dict(name='div', attrs={'class':'artikelsplitfaq'})]
remove_tags_after = [dict(name='div', attrs={'class':'artikelfuss'})]
feeds = [ ('FTD', 'http://www.ftd.de/static/ticker/ftd-topnews.rdf') ]
!DSPAM:3,496093f075721028352036!

View File

@ -0,0 +1,47 @@
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
'''
Fetch zdnet.
'''
from calibre.web.feeds.news import BasicNewsRecipe
import re
class cdnet(BasicNewsRecipe):
title = 'zdnet'
description = 'zdnet security'
__author__ = 'Oliver Niesner'
use_embedded_content = False
timefmt = ' [%d %b %Y]'
max_articles_per_feed = 40
no_stylesheets = True
encoding = 'iso-8859-1'
#preprocess_regexps = \
# [(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
# [
# (r'<84>', lambda match: ''),
# (r'<93>', lambda match: ''),
# ]
# ]
remove_tags = [dict(id='eyebrows'),
dict(id='header'),
dict(id='search'),
dict(id='nav'),
dict(id=''),
dict(name='div', attrs={'class':'banner'}),
dict(name='p', attrs={'class':'tags'}),
dict(name='div', attrs={'class':'special1'})]
remove_tags_after = [dict(name='div', attrs={'class':'bloggerDesc clear'})]
feeds = [ ('zdnet', 'http://feeds.feedburner.com/zdnet/security') ]
!DSPAM:3,496093f075721028352036!