mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update taz.de (RSS)
This commit is contained in:
parent
1a11c09d3c
commit
e7777df9ae
@ -1,3 +1,4 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2013, Alexander Schremmer <alex@alexanderweb.de>, Robert Riemann <robert@riemann.cc>'
|
||||
|
||||
@ -6,10 +7,15 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class TazRSSRecipe(BasicNewsRecipe):
|
||||
title = u'Taz - die Tageszeitung'
|
||||
description = u'Taz.de - die tageszeitung'
|
||||
description = u'Taz.de - die tageszeitung (Anpassung von Robert)'
|
||||
__author__ = 'Alexander Schremmer, Robert Riemann'
|
||||
language = 'de'
|
||||
lang = 'de-DE'
|
||||
category = 'news, Germany'
|
||||
timefmt = ' [%a, %d %b %Y]'
|
||||
publication_type = 'newspaper'
|
||||
remove_empty_feeds = True
|
||||
use_embedded_content = False
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
publisher = 'taz Entwicklungs GmbH & Co. Medien KG'
|
||||
@ -31,6 +37,12 @@ class TazRSSRecipe(BasicNewsRecipe):
|
||||
(u'Berlin', u'http://www.taz.de/Berlin/!p14;rss/'),
|
||||
(u'Nord', u'http://www.taz.de/Nord/!p11;rss/')
|
||||
]
|
||||
# omit articles already linked in Schlagzeilen feed
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
|
||||
# use the cover presented on the homepage
|
||||
cover_url = 'http://www.taz.de/digitaz/.s1jpeg320'
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'class': 'sect sect_article'})]
|
||||
remove_tags = [
|
||||
dict(name=['div'], attrs={'class': 'artikelwerbung'}),
|
||||
@ -41,3 +53,10 @@ class TazRSSRecipe(BasicNewsRecipe):
|
||||
dict(name=['div'], attrs={'class': re.compile(r".*\bsect_seealso\b.*")}),
|
||||
dict(name=['div'], attrs={'class': 'sectfoot'})
|
||||
]
|
||||
|
||||
# with article pictures on Kindle super-slow
|
||||
# def populate_article_metadata(self, article, soup, first):
|
||||
# if first and hasattr(self, 'add_toc_thumbnail'):
|
||||
# picdiv = soup.find('img')
|
||||
# if picdiv is not None:
|
||||
# self.add_toc_thumbnail(article,picdiv['src'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user