Debian Codegraph @

recipes/moscowtimes_en.recipe

raw
1 #!/usr/bin/env python
2 # vim:fileencoding=utf-8
3
4 from calibre.web.feeds.news import BasicNewsRecipe
5
6
7 class MoscowTimes(BasicNewsRecipe):
8 title = 'The Moscow Times'
9 __author__ = 'bugmen00t'
10 description = 'The Moscow Times is Russia’s leading, independent English-language media outlet. Our team of Russian and English journalists provide readers across the world with breaking news, engaging stories and balanced reporting about the largest country on Earth.' # noqa: E501
11 publisher = 'Tiamti LLC'
12 category = 'newspaper'
13 cover_url = 'https://static.themoscowtimes.com/img/share_default.jpg'
14 language = 'en_RU'
15 no_stylesheets = False
16 remove_javascript = True
17 auto_cleanup = False
18 oldest_article = 14
19 max_articles_per_feed = 50
20
21 remove_tags_before = dict(name='article')
22
23 remove_tags_after = dict(name='div', attrs={'class': 'article__tags'})
24
25 remove_tags = [
26 dict(name='aside'),
27 dict(name='footer'),
28 dict(name='section', attrs={'class': 'cluster'}),
29 dict(name='div', attrs={'class': 'article__tags'}),
30 dict(name='div', attrs={'class': 'social'}),
31 dict(name='div', attrs={'class': 'related-article__content'}),
32 ]
33
34 feeds = [
35 ('News', 'https://www.themoscowtimes.com/rss/news'),
36 ('Opinion', 'https://www.themoscowtimes.com/rss/opinion'),
37 ('Arts and Life', 'https://www.themoscowtimes.com/rss/city'),
38 ('Meanwhile', 'https://www.themoscowtimes.com/rss/meanwhile'),
39 ]