mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Radikal (Turkey). Fixes #1357794 [Updated recipe for Turkish radikal](https://bugs.launchpad.net/calibre/+bug/1357794)
This commit is contained in:
parent
240fe4bef2
commit
1e90c3b430
@ -1,5 +1,5 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2010-2014, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
radikal.com.tr
|
radikal.com.tr
|
||||||
'''
|
'''
|
||||||
@ -12,17 +12,18 @@ class Radikal_tr(BasicNewsRecipe):
|
|||||||
description = 'News from Turkey'
|
description = 'News from Turkey'
|
||||||
publisher = 'radikal'
|
publisher = 'radikal'
|
||||||
category = 'news, politics, Turkey'
|
category = 'news, politics, Turkey'
|
||||||
oldest_article = 7
|
oldest_article = 2
|
||||||
max_articles_per_feed = 150
|
max_articles_per_feed = 150
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
encoding = 'cp1254'
|
#encoding = 'iso-8859-9'
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
auto_cleanup = True
|
remove_empty_feeds = True
|
||||||
#auto_cleanup_keep = '//div[@class="thumbnail"]'
|
auto_cleanup = False
|
||||||
masthead_url = 'http://www.radikal.com.tr/D/i/1/V2/radikal_logo.jpg'
|
masthead_url = 'http://www.radikal.com.tr/D/i/1/V2/radikal_logo.jpg'
|
||||||
language = 'tr'
|
language = 'tr'
|
||||||
|
publication_type = 'newspaper'
|
||||||
extra_css = """ @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
|
extra_css = """ @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
|
||||||
.article_description,body{font-family: Arial,Verdana,Helvetica,sans1,sans-serif}
|
body{font-family: 'PT Sans',Arial,Helvetica,sans1,sans-serif}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
@ -32,26 +33,28 @@ class Radikal_tr(BasicNewsRecipe):
|
|||||||
, 'language' : language
|
, 'language' : language
|
||||||
}
|
}
|
||||||
|
|
||||||
#remove_tags = [dict(name=['embed','iframe','object','link','base'])]
|
remove_tags = [
|
||||||
#remove_tags_before = dict(name='h1')
|
dict(name=['meta','iframe','embed','object','link','base']),
|
||||||
#remove_tags_after = dict(attrs={'id':'haberDetayYazi'})
|
dict(name='div', attrs={'class':['options','news_related','browserWidth_shareBox']}),
|
||||||
|
dict(attrs={'class':['breadcrumb clearfix','box_title']})
|
||||||
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(attrs={'class':['news-content-header',
|
||||||
|
'news-content-text clearfix',
|
||||||
|
'author-content-text',
|
||||||
|
'news_detail_top',
|
||||||
|
'news_article']})
|
||||||
|
]
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Yazarlar' , u'http://www.radikal.com.tr/d/rss/RssYazarlar.xml')
|
(u'Yazarlar' , u'http://www.radikal.com.tr/d/rss/RssYazarlar.xml')
|
||||||
,(u'Turkiye' , u'http://www.radikal.com.tr/d/rss/Rss_97.xml' )
|
,(u'Türkiye' , u'http://www.radikal.com.tr/d/rss/Rss_77.xml' )
|
||||||
,(u'Politika' , u'http://www.radikal.com.tr/d/rss/Rss_98.xml' )
|
,(u'Politika' , u'http://www.radikal.com.tr/d/rss/Rss_78.xml' )
|
||||||
,(u'Dis Haberler', u'http://www.radikal.com.tr/d/rss/Rss_100.xml' )
|
,(u'Dünya' , u'http://www.radikal.com.tr/d/rss/Rss_81.xml' )
|
||||||
,(u'Ekonomi' , u'http://www.radikal.com.tr/d/rss/Rss_101.xml' )
|
,(u'Ekonomi' , u'http://www.radikal.com.tr/d/rss/Rss_80.xml' )
|
||||||
,(u'Radikal Iki' , u'http://www.radikal.com.tr/d/rss/Rss_42.xml')
|
,(u'Radikal 2' , u'http://www.radikal.com.tr/d/rss/Rss_42.xml' )
|
||||||
,(u'Radikal Hayat' , u'http://www.radikal.com.tr/d/rss/Rss_41.xml' )
|
,(u'Radikal Hayat' , u'http://www.radikal.com.tr/d/rss/Rss_41.xml' )
|
||||||
,(u'Radikal Kitap' , u'http://www.radikal.com.tr/d/rss/Rss_40.xml' )
|
,(u'Radikal Kitap' , u'http://www.radikal.com.tr/d/rss/Rss_40.xml' )
|
||||||
|
,(u'Spor' , u'http://www.radikal.com.tr/d/rss/Rss_84.xml' )
|
||||||
]
|
]
|
||||||
|
|
||||||
#def print_version(self, url):
|
|
||||||
#articleid = url.rpartition('ArticleID=')[2]
|
|
||||||
#return 'http://www.radikal.com.tr/Default.aspx?aType=HaberYazdir&ArticleID=' + articleid
|
|
||||||
|
|
||||||
#def preprocess_html(self, soup):
|
|
||||||
#return self.adeify_images(soup)
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user