Debian Codegraph @

recipes/hvg.recipe

raw
1 import re
2
3 from calibre.web.feeds.news import BasicNewsRecipe
4
5
6 class hvg(BasicNewsRecipe):
7 title = 'HVG'
8 __author__ = 'bubak'
9 language = 'hu'
10 oldest_article = 1
11 max_articles_per_feed = 20
12 no_stylesheets = True
13
14 remove_tags_before = dict(name='h1', attrs={'class': ['title']})
15
16 remove_tags = [
17 dict(name='div', attrs={'class': re.compile(r'hide-on-mobile|hide-on-tablet|hide-on-desktop|election-popup', re.IGNORECASE)}),
18 dict(name='section', attrs={'class': re.compile(r'card-section|container-narrow', re.IGNORECASE)}),
19 dict(name='div', attrs={'class': ['Desktop-responsive-display', 'ad-container-wrapper']}),
20 dict(name='ul', attrs={'class': ['tags', 'author-list']}),
21 dict(name='blockquote', attrs={'class': ['embedly-card']}),
22 dict(name='footer'),
23 dict(name='iframe'),
24 ]
25
26 feeds = [
27 ('Itthon', 'http://hvg.hu/rss/itthon'),
28 ('Világ', 'http://hvg.hu/rss/vilag'),
29 ('Gazdaság', 'http://hvg.hu/rss/gazdasag'),
30 ('Vélemény', 'http://hvg.hu/rss/velemeny'),
31 ('Tudomány', 'http://hvg.hu/rss/tudomany'),
32 ('Panoráma', 'http://hvg.hu/rss/panorama'),
33 ('Helyi érték', 'http://hvg.hu/rss/helyiertek'),
34 ('Kultúra', 'http://hvg.hu/rss/kultura'),
35 ('Egészség', 'http://hvg.hu/rss/egeszseg'),
36 ]