mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
a30460bda8
commit
4b0a076a7f
63
recipes/samanyolu_haber.recipe
Normal file
63
recipes/samanyolu_haber.recipe
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class SHaber (BasicNewsRecipe):
|
||||||
|
|
||||||
|
title = u'Samanyolu Haber'
|
||||||
|
__author__ = u'thomass'
|
||||||
|
description = ' Samanyolu Haber Sitesinden günlük haberler '
|
||||||
|
oldest_article =2
|
||||||
|
max_articles_per_feed =100
|
||||||
|
no_stylesheets = True
|
||||||
|
#delay = 1
|
||||||
|
#use_embedded_content = False
|
||||||
|
encoding = 'utf-8'
|
||||||
|
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 = ' .Haber-Baslik-Yazisi {font-weight: bold; font-size: 9px} .Haber-Ozet-Yazisi{ font-family:sans-serif;font-weight: normal;font-size: 11px } #Haber{ font-family:sans-serif;font-weight: normal;font-size: 9px }.KirmiziText{ font-weight: normal;font-size: 5px }' #.story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
|
||||||
|
|
||||||
|
#extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':['Haber-Baslik-Yazisi','Haber-Ozet-Yazisi']}),dict(name='div', attrs={'id':['ctl00_ContentPlaceHolder1_imagenew','Haber']})]#,dict(name='h6', attrs={'class':['KirmiziText',]}) dict(name='div', attrs={'id':['Haber']}),dict(name='div', attrs={'id':['gallery']})]
|
||||||
|
#remove_tags = [dict(name='img', attrs={'src':[ 'http://medya.aksiyon.com.tr/aksiyon/images/logo/logo.bmp','/aksiyon/images/template/green/baslik0.gif','mobile/home.jpg']}) ],dict(name='h1', attrs={'class':['H1-Haber-DetayBasligi']}),dict(name='h4', attrs={'class':['BrownText']}) ,
|
||||||
|
|
||||||
|
cover_img_url = 'http://static.samanyoluhaber.com/Images/resources/images/samanyoluhaber-yazi-logo.png'
|
||||||
|
masthead_url = 'http://static.samanyoluhaber.com/Images/resources/images/samanyoluhaber-yazi-logo.png'
|
||||||
|
remove_empty_feeds= True
|
||||||
|
#remove_attributes = ['width','height']
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
( u'Son Dakika', u'http://podcast.samanyoluhaber.com/sondakika.rss'),
|
||||||
|
( u'Gündem', u'http://podcast.samanyoluhaber.com/gundem.rss'),
|
||||||
|
( u'Politika ', u'http://podcast.samanyoluhaber.com/politika.rss'),
|
||||||
|
( u'Ekonomi', u'http://podcast.samanyoluhaber.com/ekonomi.rss'),
|
||||||
|
( u'Dünya', u'http://podcast.samanyoluhaber.com/dunya.rss'),
|
||||||
|
( u'Spor ', u'http://podcast.samanyoluhaber.com/spor.rss'),
|
||||||
|
( u'Sağlık', u'http://podcast.samanyoluhaber.com/saglik.rss'),
|
||||||
|
( u'Kültür', u'http://podcast.samanyoluhaber.com/kultur.rss'),
|
||||||
|
#( u'Teknoloji ', u'http://podcast.samanyoluhaber.com/teknoloji.rss'),
|
||||||
|
( u'Eğitim', u'http://podcast.samanyoluhaber.com/egitim.rss'),
|
||||||
|
( u'Ramazan', u'http://podcast.samanyoluhaber.com/ramazan.rss'),
|
||||||
|
( u'Yazarlar ', u'http://podcast.samanyoluhaber.com/yazarlar.rss'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
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?')
|
||||||
|
|
55
recipes/samanyolu_teknoloji.recipe
Normal file
55
recipes/samanyolu_teknoloji.recipe
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class SHaberTekno (BasicNewsRecipe):
|
||||||
|
|
||||||
|
title = u'Samanyolu Teknoloji'
|
||||||
|
__author__ = u'thomass'
|
||||||
|
description = 'Samanyolu Teknoloji Haber Sitesinden haberler '
|
||||||
|
oldest_article =8
|
||||||
|
max_articles_per_feed =100
|
||||||
|
no_stylesheets = True
|
||||||
|
#delay = 1
|
||||||
|
#use_embedded_content = False
|
||||||
|
encoding = 'utf-8'
|
||||||
|
publisher = 'thomass'
|
||||||
|
category = 'bilim, teknoloji, haber, türkçe'
|
||||||
|
language = 'tr'
|
||||||
|
publication_type = 'magazine'
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'tags' : category
|
||||||
|
,'language' : language
|
||||||
|
,'publisher' : publisher
|
||||||
|
,'linearize_tables': True
|
||||||
|
}
|
||||||
|
extra_css = ' .IcerikMetin{ font-family:sans-serif;font-weight: normal;font-size: 10px } .h1IcerikBaslik {font-weight: bold; font-size: 18px}' #.story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
|
||||||
|
|
||||||
|
#extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':['IcerikBaslik','IcerikMetinDiv']})]#,dict(name='span', attrs={'class':['agenda2Title']}),dict(name='div', attrs={'id':['gallery']})]
|
||||||
|
#remove_tags = [dict(name='img', attrs={'src':[ 'http://medya.aksiyon.com.tr/aksiyon/images/logo/logo.bmp','/aksiyon/images/template/green/baslik0.gif','mobile/home.jpg']}) ]
|
||||||
|
|
||||||
|
cover_img_url = 'http://teknoloji.samanyoluhaber.com/resources/images/logo_s_digi.jpg'
|
||||||
|
masthead_url = 'http://teknoloji.samanyoluhaber.com/resources/images/logo_s_digi.jpg'
|
||||||
|
remove_empty_feeds= True
|
||||||
|
#remove_attributes = ['width','height']
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
( u'GENEL', u'http://podcast.samanyoluhaber.com/Teknoloji.rss'),
|
||||||
|
( u'İNTERNET', u'http://open.dapper.net/services/shaberteknolojiinternet'),
|
||||||
|
( u'CEP TELEFONU', u'http://open.dapper.net/services/shaberteknolojicep'),
|
||||||
|
( u'OYUN', u'http://open.dapper.net/services/shaberteknolojioyun'),
|
||||||
|
( u'DONANIM', u'http://open.dapper.net/services/httpopendappernetservicesshaberteknolojidonanim'),
|
||||||
|
( u'ÜRÜN İNCELEME', u'http://open.dapper.net/services/shaberteknolojiurun'),
|
||||||
|
( u'ALIŞVERİŞ', u'http://open.dapper.net/services/shaberteknolojialisveris'),
|
||||||
|
( u'BİLİM & TEKNOLOJİ', u'http://open.dapper.net/services/shaberteknolojibilim'),
|
||||||
|
( u'HABERLER', u'http://open.dapper.net/services/shaberteknolojihaber'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
# 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?')
|
||||||
|
|
67
recipes/star_gazetesi.recipe
Normal file
67
recipes/star_gazetesi.recipe
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class Star (BasicNewsRecipe):
|
||||||
|
|
||||||
|
title = u'Star Gazetesi'
|
||||||
|
__author__ = u'thomass'
|
||||||
|
description = 'yeni Türkiye''nin Gazetesi'
|
||||||
|
oldest_article =2
|
||||||
|
max_articles_per_feed =100
|
||||||
|
no_stylesheets = True
|
||||||
|
#delay = 1
|
||||||
|
#use_embedded_content = False
|
||||||
|
encoding = 'utf-8'
|
||||||
|
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 = ' .font8{font-weight: bold; font-size:20px}.font11{font-weight: normal; font-size:small}#hdetay{ font-family:sans-serif;font-size: 9px }' #.story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
|
||||||
|
|
||||||
|
#extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':['font8']}),dict(name='span', attrs={'class':['font11']}),dict(name='div', attrs={'id':['hdetay']})]#,,dict(name='h6', attrs={'class':['KirmiziText']}) dict(name='div', attrs={'id':['Haber']}),dict(name='div', attrs={'id':['gallery']})]
|
||||||
|
#remove_tags = [dict(name='img', attrs={'src':[ 'http://medya.aksiyon.com.tr/aksiyon/images/logo/logo.bmp','/aksiyon/images/template/green/baslik0.gif','mobile/home.jpg']}) ],dict(name='h1', attrs={'class':['H1-Haber-DetayBasligi']}),dict(name='h4', attrs={'class':['BrownText']}) ,
|
||||||
|
|
||||||
|
cover_img_url = 'http://www.stargazete.com/starnew/img/starlogo.png'
|
||||||
|
masthead_url = 'http://www.stargazete.com/starnew/img/starlogo.png'
|
||||||
|
remove_empty_feeds= True
|
||||||
|
#remove_attributes = ['width','height']
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
|
||||||
|
|
||||||
|
( u'MANSET', u'http://open.dapper.net/services/starmanset'),
|
||||||
|
( u'GÜNCEL', u'http://www.stargazete.com/guncel.xml'),
|
||||||
|
( u'POLİTİKA', u'http://www.stargazete.com/politika.xml'),
|
||||||
|
( u' EKONOMİ', u'http://www.stargazete.com/ekonomi.xml'),
|
||||||
|
( u'DÜNYA', u'http://www.stargazete.com/dunya.xml'),
|
||||||
|
( u'YAZARLAR', u'http://www.stargazete.com/gazeteyazarlar.xml'),
|
||||||
|
( u'SPOR', u'http://www.stargazete.com/spor.xml'),
|
||||||
|
( u'SPOR YAZARLARI', u'http://www.stargazete.com/index.php?metot=rss&islem=sporyazarlar'),
|
||||||
|
( u'SİNEMA', u'http://www.stargazete.com/sinema.xml'),
|
||||||
|
( u'KADIN&SAĞLIK', u'http://www.stargazete.com/kadinsaglik.xml'),
|
||||||
|
( u' STARTEK', u'http://www.stargazete.com/startek.xml'),
|
||||||
|
( u' AÇIK GÖRÜŞ', u'http://www.stargazete.com/acikgorus.xml'),
|
||||||
|
( u'Star PAZAR', u'http://www.stargazete.com/pazar.xml'),
|
||||||
|
( u'Star CUMARTESİ', u'http://www.stargazete.com/cumartesi.xml'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
def preprocess_html(self, soup):#remove links
|
||||||
|
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.stargazete.com/')
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user