| 1 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 2 |
|
| 3 |
|
| 4 |
class Cumhuriyet(BasicNewsRecipe): |
| 5 |
title = 'Cumhuriyet' |
| 6 |
description = 'News from Turkey' |
| 7 |
language = 'tr' |
| 8 |
publisher = 'Cumhuriyet' |
| 9 |
oldest_article = 1 |
| 10 |
max_articles_per_feed = 10 |
| 11 |
no_stylesheets = True |
| 12 |
encoding = 'utf-8' |
| 13 |
use_embedded_content = False |
| 14 |
timefmt = ' [%d %b %Y]' |
| 15 |
ignore_duplicate_articles = {'title', 'url'} |
| 16 |
remove_empty_feeds = True |
| 17 |
|
| 18 |
keep_only_tags = [ |
| 19 |
dict(name='h1', attrs={'class': 'baslik'}), |
| 20 |
dict(name='h2', attrs={'class': 'spot'}), |
| 21 |
dict(name='div', attrs={'class': 'haberKaynagi'}), |
| 22 |
dict(name='div', attrs={'class': 'yayin-tarihi'}), |
| 23 |
dict(name='div', attrs={'class': 'haberMetni'}), |
| 24 |
] |
| 25 |
|
| 26 |
remove_tags = [ |
| 27 |
dict(name=['button', 'svg']), |
| 28 |
dict(name='ul', attrs={'class': 'breadcrumbs'}), |
| 29 |
dict(name='div', attrs={'class': 'google-news'}), |
| 30 |
dict(name='div', attrs={'class': 'iliskiliHaberler'}), |
| 31 |
] |
| 32 |
|
| 33 |
feeds = [ |
| 34 |
('Gundem', 'https://www.cumhuriyet.com.tr/rss/9999'), |
| 35 |
('Dünya', 'https://www.cumhuriyet.com.tr/rss/4'), |
| 36 |
('Türkiye', 'https://www.cumhuriyet.com.tr/rss/3'), |
| 37 |
('Ekonomi', 'https://www.cumhuriyet.com.tr/rss/5'), |
| 38 |
('Kultur Sanat', 'https://www.cumhuriyet.com.tr/rss/6'), |
| 39 |
('Siyaset', 'https://www.cumhuriyet.com.tr/rss/2'), |
| 40 |
('Bilim ve Teknoloji', 'https://www.cumhuriyet.com.tr/rss/10'), |
| 41 |
('Tarım', 'https://www.cumhuriyet.com.tr/rss/19'), |
| 42 |
] |