Update Hurriyet

This commit is contained in:
Kovid Goyal 2016-07-09 09:57:45 +05:30
parent e9c67487b2
commit 85502aa97b

View File

@ -4,10 +4,10 @@
# Contact: adrian.tennessee at domainthatnobodytakes.com # Contact: adrian.tennessee at domainthatnobodytakes.com
## ##
# License: GNU General Public License v3 - http://www.gnu.org/copyleft/gpl.html # License: GNU General Public License v3 - http://www.gnu.org/copyleft/gpl.html
# Copyright: Copyright 2014 Adrian Tennessee # Copyright: Copyright 2015 Adrian Tennessee
## ##
# Written: 2015-07-11 # Written: 2015-07-11
# Last Edited: 2015-07-11 # Last Edited: 2016-07-08
## ##
from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds.news import BasicNewsRecipe
@ -32,38 +32,37 @@ class Hurriyet(BasicNewsRecipe):
remove_javascript = True remove_javascript = True
encoding = None encoding = None
# keep main image in its own line compress_news_images = True
extra_css = '.detailImage { clear: left; } .detailSpot { clear: left; }'
# some mild formatting
extra_css = """.news-image { clear: left; }
.news-detail-title { clear:left; }
.col-md-7 { font-size:small; }
.news-detail-spot { font-style:italic; font-size:smaller }"""
keep_only_tags = [ keep_only_tags = [
# title # title
{'class': 'detailTop clr'}, {'class': 'news-detail-title selectionShareable'},
# date
{'class': 'col-md-7 text-right'},
# image # image
{'class': 'detailImage clr'}, {'class': 'news-image'},
# detail
{'class': 'news-detail-spot'},
# text # text
{'class': 'detailText'}, {'class': 'news-box'},
] ]
feeds = [ feeds = [
(u'Anasayfa', u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=1'), (u'Anasayfa', u'http://www.hurriyet.com.tr/rss/anasayfa'),
(u'Gündem', (u'Gündem', u' http://www.hurriyet.com.tr/rss/gundem'),
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2'), (u'Ekonomi', u'http://www.hurriyet.com.tr/rss/ekonomi'),
(u'Ekonomi', (u'Magazin', u'http://www.hurriyet.com.tr/rss/magazin'),
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=4'), (u'Spor', u'http://www.hurriyet.com.tr/rss/spor'),
(u'Magazin', (u'Planet', u'http://www.hurriyet.com.tr/rss/dunya'),
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2035'), (u'Teknoloji', u'http://www.hurriyet.com.tr/rss/teknoloji'),
(u'Spor', (u'Sağlık', u'http://www.hurriyet.com.tr/rss/saglik'),
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=14'), (u'Astroloji', u'http://www.hurriyet.com.tr/rss/astroloji'),
(u'Planet', (u'Ankara', u'http://www.hurriyet.com.tr/rss/ankara'),
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2249'), (u'Ege', u'http://www.hurriyet.com.tr/rss/ege')
(u'Teknoloji',
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2158'),
(u'Sağlık',
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2446'),
(u'Kültür Sanat',
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2451'),
(u'Sinema',
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2437'),
(u'Astroloji',
u'http://rss.hurriyet.com.tr/rss.aspx?sectionId=2409'),
] ]