| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=utf-8 |
| 3 |
|
| 4 |
__license__ = 'GPL v3' |
| 5 |
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>' |
| 6 |
''' |
| 7 |
www.ria.ru |
| 8 |
''' |
| 9 |
|
| 10 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 11 |
|
| 12 |
|
| 13 |
class RIANovosti(BasicNewsRecipe): |
| 14 |
title = 'RIA Novosti - Russian' |
| 15 |
__author__ = 'Darko Miletic (with fixes by bugmen00t)' |
| 16 |
description = 'News from Russia' |
| 17 |
publisher = '\u041c\u0418\u0410 \u00ab\u0420\u043e\u0441\u0441\u0438\u044f \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u00bb\u2028 (MIA Russia Today)' |
| 18 |
category = 'news, politics, Russia' |
| 19 |
oldest_article = 7 |
| 20 |
max_articles_per_feed = 100 |
| 21 |
no_stylesheets = True |
| 22 |
use_embedded_content = False |
| 23 |
encoding = 'utf8' |
| 24 |
language = 'ru' |
| 25 |
publication_type = 'newsportal' |
| 26 |
cover_url = 'https://oldimg.ria.ru/i/ria_social.png' |
| 27 |
|
| 28 |
remove_tags_before = dict(name='div', attrs={'class': 'article__header'}) |
| 29 |
|
| 30 |
remove_tags_after = dict(name='div', attrs={'class': 'article__userbar'}) |
| 31 |
|
| 32 |
remove_tags = [ |
| 33 |
dict(name='div', attrs={'class': 'article__userbar'}), |
| 34 |
dict(name='div', attrs={'class': 'article__title'}), |
| 35 |
dict(name='div', attrs={'class': 'article__aggr'}), |
| 36 |
dict(name='div', attrs={'class': 'article__article-info'}), |
| 37 |
] |
| 38 |
|
| 39 |
feeds = [('\u041b\u0435\u043d\u0442\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439', 'https://ria.ru/export/rss2/archive/index.xml')] |