| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=utf-8 |
| 3 |
|
| 4 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 5 |
|
| 6 |
|
| 7 |
class Snob(BasicNewsRecipe): |
| 8 |
title = '\u0421\u043d\u043e\u0431' |
| 9 |
__author__ = 'bugmen00t' |
| 10 |
description = '\u0414\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0435, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0438 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0438\u0432\u0443\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0430\u0445, \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043d\u043e \u0434\u0443\u043c\u0430\u044e\u0442 \u043f\u043e-\u0440\u0443\u0441\u0441\u043a\u0438.' # noqa: E501 |
| 11 |
publisher = '\u041e\u041e\u041e \u00ab\u0421\u043d\u043e\u0431 \u041c\u0435\u0434\u0438\u0430\u00bb' |
| 12 |
category = 'magazine' |
| 13 |
cover_url = 'https://snob.ru/indoc/tilda/995317/images/tild3233-6631-4664-b663-353636373235__e3057a5fee932ada1aaf.png' |
| 14 |
language = 'ru' |
| 15 |
no_stylesheets = False |
| 16 |
remove_javascript = False |
| 17 |
auto_cleanup = False |
| 18 |
oldest_article = 5 |
| 19 |
max_articles_per_feed = 50 |
| 20 |
|
| 21 |
remove_tags_before = dict(name='h1') |
| 22 |
|
| 23 |
remove_tags_after = dict(name='article') |
| 24 |
|
| 25 |
remove_tags = [dict(name='div', attrs={'class': 'entry__tags'}), dict(name='div', attrs={'class': 'entry__likes'})] |
| 26 |
|
| 27 |
feeds = [('\u0421\u043d\u043e\u0431', 'https://snob.ru/rss/')] |
| 28 |
|
| 29 |
def get_article_url(self, article): |
| 30 |
link = article.get('link', None) |
| 31 |
if 'utm_source' in link: |
| 32 |
return link.split('?utm')[0] |