mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
* 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.
23 lines
649 B
Plaintext
23 lines
649 B
Plaintext
from calibre.web.feeds.news import BasicNewsRecipe
|
|
|
|
|
|
class Netzpolitik(BasicNewsRecipe):
|
|
title = u'Netzpolitik'
|
|
publication_type = 'newspaper'
|
|
oldest_article = 14
|
|
language = 'de'
|
|
no_stylesheets = True
|
|
__author__ = 'Kovid Goyal'
|
|
max_articles_per_feed = 100
|
|
use_embedded_content = True
|
|
|
|
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'
|