| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=utf-8 |
| 3 |
|
| 4 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 5 |
|
| 6 |
|
| 7 |
class UkrInform(BasicNewsRecipe): |
| 8 |
title = 'UkrInform (English)' |
| 9 |
__author__ = 'bugmen00t' |
| 10 |
description = 'State information and news agency of Ukraine.' |
| 11 |
publisher = 'Ministry of Culture and Information Policy of Ukraine' |
| 12 |
category = 'newspaper' |
| 13 |
cover_url = 'https://static.ukrinform.com/photos/2022_05/thumb_files/630_360_1651819943-560.jpg' |
| 14 |
language = 'en_UK' |
| 15 |
no_stylesheets = True |
| 16 |
remove_javascript = False |
| 17 |
auto_cleanup = False |
| 18 |
oldest_article = 7 |
| 19 |
max_articles_per_feed = 30 |
| 20 |
|
| 21 |
remove_tags_before = dict(name='article') |
| 22 |
|
| 23 |
remove_tags_after = dict(name='article') |
| 24 |
|
| 25 |
remove_tags = [ |
| 26 |
dict(name='aside'), |
| 27 |
dict(name='img', attrs={'class': 'pixel'}), |
| 28 |
dict(name='section', attrs={'class': 'read'}), |
| 29 |
dict(name='div', attrs={'data-name': 'int_hidden'}), |
| 30 |
] |
| 31 |
|
| 32 |
feeds = [ |
| 33 |
('Latest news', 'https://www.ukrinform.net/rss/block-lastnews'), |
| 34 |
('War', 'https://www.ukrinform.net/rss/rubric-ato'), |
| 35 |
('Politics', 'https://www.ukrinform.net/rss/rubric-polytics'), |
| 36 |
('Economy', 'https://www.ukrinform.net/rss/rubric-economy'), |
| 37 |
('Defense', 'https://www.ukrinform.net/rss/rubric-defense'), |
| 38 |
('Society and Culture', 'https://www.ukrinform.net/rss/rubric-society'), |
| 39 |
('Sports', 'https://www.ukrinform.net/rss/rubric-sports'), |
| 40 |
('Crime', 'https://www.ukrinform.net/rss/rubric-crime'), |
| 41 |
('Accidents and Emergencies', 'https://www.ukrinform.net/rss/rubric-emergencies'), |
| 42 |
] |