mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update recipe “Netzpolitik”.
* Give the class a proper name. * Update feed URL. * Set publication type. * Use embedded content and remove “remove_tags”. * Remove duplicate title image. * Add cover.
This commit is contained in:
parent
82ba1b89d0
commit
9138607c23
@ -1,15 +1,22 @@
|
|||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class BasicUserRecipe1257093186(BasicNewsRecipe):
|
class Netzpolitik(BasicNewsRecipe):
|
||||||
title = u'Netzpolitik'
|
title = u'Netzpolitik'
|
||||||
|
publication_type = 'newspaper'
|
||||||
oldest_article = 14
|
oldest_article = 14
|
||||||
language = 'de'
|
language = 'de'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
__author__ = 'Kovid Goyal'
|
__author__ = 'Kovid Goyal'
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
remove_tags = [dict(id=['respond', 'ackt', 'nav', 'commentblock',
|
use_embedded_content = True
|
||||||
'l_sidebar', 'r_sidebar']), dict(attrs={'class': ['widgettitle',
|
|
||||||
'bt-links', 'navigation']})]
|
|
||||||
|
|
||||||
feeds = [(u'Netzpolitik.org', u'http://www.netzpolitik.org/feed/')]
|
feeds = [(u'Netzpolitik.org', u'https://netzpolitik.org/feed/')]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
# Remove the duplicate title image.
|
||||||
|
soup.body.img.decompose()
|
||||||
|
return soup
|
||||||
|
|
||||||
|
def get_cover_url(self):
|
||||||
|
return 'https://netzpolitik.org/wp-upload/2018/11/cropped-np_favicon_004-1-484x484.png'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user