mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-05 08:40:13 -04:00
Update Spektrum der Wissenschaft
This commit is contained in:
parent
aadbe9b01e
commit
eac0c5ddb4
@ -1,28 +1,53 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = ''
|
||||||
|
'''
|
||||||
|
Fetch RSS-Feeds spektrum.de
|
||||||
|
'''
|
||||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||||
class AdvancedUserRecipe1303841067(BasicNewsRecipe):
|
class AdvancedUserRecipe1303841067(BasicNewsRecipe):
|
||||||
title = u'Spektrum (der Wissenschaft)'
|
title = u'Spektrum (der Wissenschaft)'
|
||||||
__author__ = 'schuster'
|
__author__ = 'Armin Geller, Bratzzo, Rainer Zenz' # Update Bratzzo & AGE 2012-10-12
|
||||||
|
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100 #100
|
||||||
language = 'de'
|
no_stylesheets = True
|
||||||
cover_url = 'http://upload.wikimedia.org/wikipedia/de/3/3b/Spektrum_der_Wissenschaft_Logo.svg'
|
remove_javascript = True
|
||||||
|
remove_empty_feeds = True
|
||||||
|
language = 'de_DE'
|
||||||
|
# conversion_options = {'base_font_size': 20}
|
||||||
|
|
||||||
remove_tags = [dict(attrs={'class':['hauptnaviPkt gainlayout', 'hauptnaviButton', 'suchButton', 'suchbegriffKasten', 'loginButton', 'subnavigation', 'artikelInfoLeiste gainlayout', 'artikelTools', 'nurLetzteSeite', 'link', 'boxUnterArtikel', 'leserbriefeBlock', 'boxTitel', 'boxInhalt', 'sehrklein', 'boxabstand', 'werbeboxinhalt', 'rbabstand', 'bildlinks', 'rechtebox', 'denkmalbox', 'denkmalfrage']}),
|
# cover_url = 'http://upload.wikimedia.org/wikipedia/de/3/3b/Spektrum_der_Wissenschaft_Logo.svg' # old logo
|
||||||
dict(id=['pflip', 'verlagsleiste', 'bereich', 'bannerVertikal', 'headerLogoLink', 'kopf', 'topNavi', 'headerSchnellsuche', 'headerSchnellsucheWarten', 'navigation', 'navigationL', 'navigationR', 'inhalt', 'rechtespalte', 'sdwboxenshop', 'shopboxen', 'fuss']),
|
# cover_url = 'http://spektrumverlag.de/sixcms/media.php/776/thumbnails/sdwv_faecher.jpg.459370.jpg'
|
||||||
dict(name=['naservice'])]
|
# cover_url = 'http://spektrumverlag.de/sixcms/media.php/776/thumbnails/sdwv_logo.jpg.432645.jpg'
|
||||||
|
cover_url = 'http://upload.wikimedia.org/wikipedia/de/5/59/Spektrum-cover.jpg' # from Rainer Zenz
|
||||||
|
|
||||||
def print_version(self,url):
|
extra_css = '''
|
||||||
newurl = url.replace('artikel/', 'sixcms/detail.php?id=')
|
h1 {font-size: 2em;}
|
||||||
return newurl + '&_druckversion=1'
|
h2 {font-size: 1em; font-style: italic; font-weight: bold;}
|
||||||
|
h3 {font-size: 1em;}
|
||||||
|
h4, h5, h6, .heading, .hgroup {font-size: 1em;}
|
||||||
|
'''
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Spektrum.de', u'http://www.spektrum.de/alias/rss/spektrum-de-rss-feed/996406'),
|
||||||
|
(u'Gehirn & Geist', u'http://www.spektrum.de/alias/rss/gehirn-geist-rss-feed/982626'),
|
||||||
|
(u'epoc', u'http://www.spektrum.de/alias/rss/epoc-rss-feed/982625'),
|
||||||
|
(u'Spektrum der Wissenschaft', u'http://www.spektrum.de/alias/rss/spektrum-der-wissenschaft-rss-feed/982623'),
|
||||||
|
(u'Sterne und Weltraum', u'http://www.spektrum.de/alias/rss/sterne-und-weltraum-rss-feed/865248'),
|
||||||
|
(u'Editional', u'http://www.spektrum.de/alias/rss/spektrum-de-editorial/996044'),
|
||||||
|
(u'Pressemitteilungen', u'http://www.spektrum.de/alias/rss/pressemitteilungen/995265'),
|
||||||
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name='div', attrs={'class':'border-h clearfix article-top'}),
|
||||||
|
dict(name='div', attrs={'class':'clearfix'}),
|
||||||
|
dict(name='div', attrs={'class':'bilderrahmenlinks'}),
|
||||||
|
dict(name='div', attrs={'class':'relcontainer'}),
|
||||||
|
]
|
||||||
|
|
||||||
feeds = [(u'Spektrum der Wissenschaft', u'http://www.spektrum.de/artikel/982623'),
|
remove_tags_after=dict(name='div', attrs={'class':['sidebar-box-head']})
|
||||||
(u'SpektrumDirekt', u'http://www.spektrumdirekt.de/artikel/996406'),
|
|
||||||
(u'Sterne und Weltraum', u'http://www.astronomie-heute.de/artikel/865248'),
|
|
||||||
(u'Gehirn & Geist', u'http://www.gehirn-und-geist.de/artikel/982626'),
|
|
||||||
(u'epoc', u'http://www.epoc.de/artikel/982625')
|
|
||||||
|
|
||||||
]
|
remove_tags = [
|
||||||
|
dict(attrs={'id':['recommend-article', 'dossierbox', 'cover', 'toc']}),
|
||||||
filter_regexps = [r'ads\.doubleclick\.net']
|
dict(attrs={'class':['sidebar-box-full clearfix', 'linktotop' ]}),
|
||||||
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user