Debian Codegraph @

recipes/hurriyet.recipe

raw
1 ##
2 # Title: Hürriyet recipe for calibre
3 # Author: Adrian Tennessee
4 # Contact: adrian.tennessee at domainthatnobodytakes.com
5 ##
6 # License: GNU General Public License v3 - http://www.gnu.org/copyleft/gpl.html
7 # Copyright: Copyright 2015 Adrian Tennessee
8 ##
9 # Written: 2015-07-11
10 # Last Edited: 2024-08-30
11 ##
12
13 from calibre.web.feeds.news import BasicNewsRecipe
14
15
16 class Hurriyet(BasicNewsRecipe):
17 __author__ = 'Adrian Tennessee (adrian.tennessee at domainthatnobodytakes.com)'
18 __license__ = 'GPLv3'
19 __copyright__ = '2015, Adrian Tennessee <adrian.tennessee at domainthatnobodytakes.com)'
20
21 title = 'Hürriyet'
22 language = 'tr'
23 description = 'Hürriyet web site ebook'
24 publisher = 'Doğan Media Group'
25 category = 'news'
26 cover_url = 'https://upload.wikimedia.org/wikipedia/en/4/4f/H%C3%BCrriyet_ilk_sayi.jpg'
27
28 oldest_article = 7
29 max_articles_per_feed = 50
30 use_embedded_content = False
31 no_stylesheets = True
32 remove_javascript = True
33 encoding = None
34
35 compress_news_images = True
36
37 # some mild formatting
38 extra_css = '''.news-media { clear: left; }
39 .news-detail-title { clear:left; }'''
40
41 keep_only_tags = [
42 # title
43 {'class': 'news-detail-title'},
44 # date
45 {'class': 'news-detail-text'},
46 # media
47 {'class': 'news-media'},
48 # brief content
49 {'class': 'news-content__inf'},
50 # main content
51 {'class': 'news-content readingTime'},
52 ]
53
54 feeds = [
55 ('Anasayfa', 'https://www.hurriyet.com.tr/rss/anasayfa'),
56 ('Gündem', 'https://www.hurriyet.com.tr/rss/gundem'),
57 ('Ekonomi', 'https://www.hurriyet.com.tr/rss/ekonomi'),
58 ('Magazin', 'https://www.hurriyet.com.tr/rss/magazin'),
59 ('Spor', 'https://www.hurriyet.com.tr/rss/spor'),
60 ('Planet', 'https://www.hurriyet.com.tr/rss/dunya'),
61 ('Teknoloji', 'https://www.hurriyet.com.tr/rss/teknoloji'),
62 ('Sağlık', 'https://www.hurriyet.com.tr/rss/saglik'),
63 ('Astroloji', 'https://www.hurriyet.com.tr/rss/astroloji'),
64 ('Ankara', 'https://www.hurriyet.com.tr/rss/ankara'),
65 ('Ege', 'https://www.hurriyet.com.tr/rss/ege'),
66 ]