mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #3728 (Updated recipe for The Toronto Star)
This commit is contained in:
parent
dc58e890bf
commit
9848c1ec4b
@ -17,10 +17,10 @@ class TheTorontoStar(BasicNewsRecipe):
|
|||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
|
delay = 2
|
||||||
publisher = 'The Toronto Star'
|
publisher = 'The Toronto Star'
|
||||||
category = "Toronto Star,Canada's largest daily newspaper,breaking news,classifieds,careers,GTA,Toronto Maple Leafs,sports,Toronto,news,editorial,The Star,Ontario,information,columnists,business,entertainment,births,deaths,automotive,rentals,weather,archives,Torstar,technology,Joseph Atkinson"
|
category = "Toronto Star,Canada's largest daily newspaper,breaking news,classifieds,careers,GTA,Toronto Maple Leafs,sports,Toronto,news,editorial,The Star,Ontario,information,columnists,business,entertainment,births,deaths,automotive,rentals,weather,archives,Torstar,technology,Joseph Atkinson"
|
||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
extra_css = ' .headlineArticle{font-size: x-large; font-weight: bold} .navbar{text-align:center} '
|
|
||||||
|
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
'comments' : description
|
'comments' : description
|
||||||
@ -28,8 +28,8 @@ class TheTorontoStar(BasicNewsRecipe):
|
|||||||
,'publisher' : publisher
|
,'publisher' : publisher
|
||||||
}
|
}
|
||||||
|
|
||||||
keep_only_tags = [dict(name='div', attrs={'id':'AssetWebPart1'})]
|
keep_only_tags = [dict(name='div', attrs={'class':'ts-article'})]
|
||||||
remove_attributes= ['style']
|
remove_tags_before = dict(name='div',attrs={'id':'ts-article_header'})
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'News' , u'http://www.thestar.com/rss/0?searchMode=Query&categories=296' )
|
(u'News' , u'http://www.thestar.com/rss/0?searchMode=Query&categories=296' )
|
||||||
@ -43,5 +43,7 @@ class TheTorontoStar(BasicNewsRecipe):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def print_version(self, url):
|
def print_version(self, url):
|
||||||
return url.replace('/article/','/printArticle/')
|
artl = url.rpartition('--')[0]
|
||||||
|
artid = artl.rpartition('/')[2]
|
||||||
|
return 'http://www.thestar.com/printarticle/' + artid
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user