diff --git a/recipes/h7_tumspor.recipe b/recipes/h7_tumspor.recipe new file mode 100644 index 0000000000..183caa3120 --- /dev/null +++ b/recipes/h7_tumspor.recipe @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- + +from calibre.web.feeds.news import BasicNewsRecipe + +class Haber7TS (BasicNewsRecipe): + + title = u'H7 TÜMSPOR' + __author__ = u'thomass' + description = ' Haber 7 TÜMSPOR sitesinden tüm branşlarda spor haberleri ' + oldest_article =2 + max_articles_per_feed =100 + no_stylesheets = True + #delay = 1 + #use_embedded_content = False + encoding = 'ISO 8859-9' + publisher = 'thomass' + category = 'güncel, haber, türkçe,spor,futbol' + language = 'tr' + publication_type = 'newspaper' + + conversion_options = { + 'tags' : category + ,'language' : language + ,'publisher' : publisher + ,'linearize_tables': True + } + extra_css = ' #newsheadcon h1{font-weight: bold; font-size: 18px;color:#0000FF} ' + keep_only_tags = [dict(name='div', attrs={'class':['intNews','leftmidmerge']})] + remove_tags = [dict(name='div', attrs={'id':['blocktitle','banner46860body']}),dict(name='div', attrs={'class':[ 'Breadcrumb','shr','mobile/home.jpg','etiket','yorumYazNew','shr','y-list','banner','lftBannerShowcase','comments','interNews','lftBanner','midblock','rightblock','comnum','commentcon',]}) ,dict(name='a', attrs={'class':['saveto','sendto','comlink','newsshare',]}),dict(name='iframe', attrs={'name':['frm111','frm107']}) ,dict(name='ul', attrs={'class':['nocPagi','leftmidmerge']})] + cover_img_url = 'http://image.tumspor.com/v2/images/tasarim/images/logo.jpg' + masthead_url = 'http://image.tumspor.com/v2/images/tasarim/images/logo.jpg' + remove_empty_feeds= True + + feeds = [ + ( u'Futbol', u'http://open.dapper.net/services/h7tsfutbol'), + ( u'Basketbol', u'http://open.dapper.net/services/h7tsbasket'), + ( u'Tenis', u'http://open.dapper.net/services/h7tstenis'), + ( u'NBA', u'http://open.dapper.net/services/h7tsnba'), + ( u'Diğer Sporlar', u'http://open.dapper.net/services/h7tsdiger'), + ( u'Yazarlar & Magazin', u'http://open.dapper.net/services/h7tsyazarmagazin'), + ] + def preprocess_html(self, soup): + for alink in soup.findAll('a'): + if alink.string is not None: + tstr = alink.string + alink.replaceWith(tstr) + return soup + # def print_version(self, url): + # return url.replace('http://www.aksiyon.com.tr/aksiyon/newsDetail_getNewsById.action?load=detay&', 'http://www.aksiyon.com.tr/aksiyon/mobile_detailn.action?') + diff --git a/recipes/haber7.recipe b/recipes/haber7.recipe new file mode 100644 index 0000000000..1eccd9a68e --- /dev/null +++ b/recipes/haber7.recipe @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- + +from calibre.web.feeds.news import BasicNewsRecipe + +class Haber7 (BasicNewsRecipe): + + title = u'Haber 7' + __author__ = u'thomass' + description = ' Haber 7 sitesinden haberler ' + oldest_article =2 + max_articles_per_feed =100 + no_stylesheets = True + #delay = 1 + #use_embedded_content = False + encoding = 'ISO 8859-9' + publisher = 'thomass' + category = 'güncel, haber, türkçe' + language = 'tr' + publication_type = 'newspaper' + + conversion_options = { + 'tags' : category + ,'language' : language + ,'publisher' : publisher + ,'linearize_tables': True + } + extra_css = 'body{ font-size: 12px}h2{font-weight: bold; font-size: 18px;color:#0000FF} #newsheadcon h1{font-weight: bold; font-size: 18px;color:#0000FF}' + + keep_only_tags = [dict(name='div', attrs={'class':['intNews','leftmidmerge']})] + remove_tags = [dict(name='div', attrs={'id':['blocktitle','banner46860body']}),dict(name='div', attrs={'class':[ 'Breadcrumb','shr','mobile/home.jpg','etiket','yorumYazNew','shr','y-list','banner','lftBannerShowcase','comments','interNews','lftBanner','midblock','rightblock','comnum','commentcon',]}) ,dict(name='a', attrs={'class':['saveto','sendto','comlink','newsshare',]}),dict(name='iframe', attrs={'name':['frm111','frm107']}) ,dict(name='ul', attrs={'class':['nocPagi','leftmidmerge']})] + + cover_img_url = 'http://dl.dropbox.com/u/39726752/haber7.JPG' + masthead_url = 'http://dl.dropbox.com/u/39726752/haber7.JPG' + remove_empty_feeds= True + + feeds = [ + ( u'Siyaset', u'http://open.dapper.net/services/h7siyaset'), + ( u'Güncel', u'http://open.dapper.net/services/h7guncel'), + ( u'Yaşam', u'http://open.dapper.net/services/h7yasam'), + ( u'Ekonomi', u'http://open.dapper.net/services/h7ekonomi'), + ( u'3. Sayfa', u'http://open.dapper.net/services/h73sayfa'), + ( u'Dünya', u'http://open.dapper.net/services/h7dunya'), + ( u'Medya', u'http://open.dapper.net/services/h7medya'), + + ( u'Yazarlar', u'http://open.dapper.net/services/h7yazarlar'), + ( u'Bilim', u'http://open.dapper.net/services/h7bilim'), + ( u'Eğitim', u'http://open.dapper.net/services/h7egitim'), + ( u'Spor', u'http://open.dapper.net/services/h7sporv3'), + + + ] + def preprocess_html(self, soup): + for alink in soup.findAll('a'): + if alink.string is not None: + tstr = alink.string + alink.replaceWith(tstr) + return soup + # def print_version(self, url): + # return url.replace('http://www.aksiyon.com.tr/aksiyon/newsDetail_getNewsById.action?load=detay&', 'http://www.aksiyon.com.tr/aksiyon/mobile_detailn.action?') +