mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Sync to trunk.
This commit is contained in:
commit
33f0f6c648
@ -36,6 +36,7 @@ class Guardian(BasicNewsRecipe):
|
|||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name='div', attrs={'class':["video-content","videos-third-column"]}),
|
dict(name='div', attrs={'class':["video-content","videos-third-column"]}),
|
||||||
dict(name='div', attrs={'id':["article-toolbox","subscribe-feeds",]}),
|
dict(name='div', attrs={'id':["article-toolbox","subscribe-feeds",]}),
|
||||||
|
dict(name='div', attrs={'class':["guardian-tickets promo-component",]}),
|
||||||
dict(name='ul', attrs={'class':["pagination"]}),
|
dict(name='ul', attrs={'class':["pagination"]}),
|
||||||
dict(name='ul', attrs={'id':["content-actions"]}),
|
dict(name='ul', attrs={'id':["content-actions"]}),
|
||||||
#dict(name='img'),
|
#dict(name='img'),
|
||||||
|
@ -2,7 +2,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
|
|
||||||
class AdvancedUserRecipe1282101454(BasicNewsRecipe):
|
class AdvancedUserRecipe1282101454(BasicNewsRecipe):
|
||||||
title = 'West Hawaii Today'
|
title = 'West Hawaii Today'
|
||||||
__author__ = 'Tony Stegall'
|
__author__ = 'Tony Stegall, fixed by HK'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
description = 'Westhawaiitoday.com'
|
description = 'Westhawaiitoday.com'
|
||||||
publisher = 'West Hawaii '
|
publisher = 'West Hawaii '
|
||||||
@ -15,7 +15,14 @@ class AdvancedUserRecipe1282101454(BasicNewsRecipe):
|
|||||||
|
|
||||||
masthead_url = 'http://images.townnews.com/westhawaiitoday.com/art/whttoplogo.gif'
|
masthead_url = 'http://images.townnews.com/westhawaiitoday.com/art/whttoplogo.gif'
|
||||||
|
|
||||||
|
feeds = [
|
||||||
feeds = [ 'http://www.westhawaiitoday.com/rss.xml']
|
('http://www.westhawaiitoday.com/taxonomy/term/2/feed'), #Local News
|
||||||
|
('http://www.westhawaiitoday.com/taxonomy/term/15/feed'), #Local Sports
|
||||||
|
('http://www.westhawaiitoday.com/taxonomy/term/4/feed'), #Local Features
|
||||||
|
('http://www.westhawaiitoday.com/taxonomy/term/12/feed'), #Obituaries
|
||||||
|
('http://www.westhawaiitoday.com/taxonomy/term/18/feed'), #Letters
|
||||||
|
('http://www.westhawaiitoday.com/taxonomy/term/19/feed'), #Editorial
|
||||||
|
('http://www.westhawaiitoday.com/taxonomy/term/20/feed'), #columns
|
||||||
|
('http://www.westhawaiitoday.com/taxonomy/term/13/feed') #Volcano Update (Sundays)
|
||||||
|
]
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class iHeuteRecipe(BasicNewsRecipe):
|
|||||||
dict(name='table', attrs={'class':['video-16ku9']})]
|
dict(name='table', attrs={'class':['video-16ku9']})]
|
||||||
remove_tags_after = [dict(name='div',attrs={'id':['related','related2']})]
|
remove_tags_after = [dict(name='div',attrs={'id':['related','related2']})]
|
||||||
|
|
||||||
keep_only_tags = [dict(name='div', attrs={'class':['art-full adwords-text','dil-day']})
|
keep_only_tags = [dict(name='div', attrs={'class':['art-full adwords-text','dil-day','art-full']})
|
||||||
,dict(name='table',attrs={'class':['kemel-box']})]
|
,dict(name='table',attrs={'class':['kemel-box']})]
|
||||||
|
|
||||||
def print_version(self, url):
|
def print_version(self, url):
|
||||||
|
@ -15,10 +15,10 @@ class InternationalHeraldTribune(BasicNewsRecipe):
|
|||||||
language = 'en'
|
language = 'en'
|
||||||
|
|
||||||
oldest_article = 1
|
oldest_article = 1
|
||||||
max_articles_per_feed = 10
|
max_articles_per_feed = 30
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
|
|
||||||
remove_tags = [dict(name='div', attrs={'class':'footer'}),
|
remove_tags = [dict(name='div', attrs={'class':['footer','header']}),
|
||||||
dict(name=['form'])]
|
dict(name=['form'])]
|
||||||
preprocess_regexps = [
|
preprocess_regexps = [
|
||||||
(re.compile(r'<!-- webtrends.*', re.DOTALL),
|
(re.compile(r'<!-- webtrends.*', re.DOTALL),
|
||||||
@ -26,6 +26,8 @@ class InternationalHeraldTribune(BasicNewsRecipe):
|
|||||||
]
|
]
|
||||||
extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'
|
extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'
|
||||||
|
|
||||||
|
remove_empty_feeds = True
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Frontpage', u'http://www.iht.com/rss/frontpage.xml'),
|
(u'Frontpage', u'http://www.iht.com/rss/frontpage.xml'),
|
||||||
(u'Business', u'http://www.iht.com/rss/business.xml'),
|
(u'Business', u'http://www.iht.com/rss/business.xml'),
|
||||||
@ -46,13 +48,15 @@ class InternationalHeraldTribune(BasicNewsRecipe):
|
|||||||
]
|
]
|
||||||
temp_files = []
|
temp_files = []
|
||||||
articles_are_obfuscated = True
|
articles_are_obfuscated = True
|
||||||
|
|
||||||
def get_obfuscated_article(self, url, logger):
|
masthead_url = 'http://graphics8.nytimes.com/images/misc/iht-masthead-logo.gif'
|
||||||
|
|
||||||
|
def get_obfuscated_article(self, url):
|
||||||
br = self.get_browser()
|
br = self.get_browser()
|
||||||
br.open(url)
|
br.open(url)
|
||||||
br.select_form(name='printFriendly')
|
response1 = br.follow_link(url_regex=re.compile(r'.*pagewanted=print.*'))
|
||||||
res = br.submit()
|
html = response1.read()
|
||||||
html = res.read()
|
|
||||||
self.temp_files.append(PersistentTemporaryFile('_iht.html'))
|
self.temp_files.append(PersistentTemporaryFile('_iht.html'))
|
||||||
self.temp_files[-1].write(html)
|
self.temp_files[-1].write(html)
|
||||||
self.temp_files[-1].close()
|
self.temp_files[-1].close()
|
||||||
|
@ -7,6 +7,7 @@ class SmithsonianMagazine(BasicNewsRecipe):
|
|||||||
__author__ = 'Krittika Goyal'
|
__author__ = 'Krittika Goyal'
|
||||||
oldest_article = 31#days
|
oldest_article = 31#days
|
||||||
max_articles_per_feed = 50
|
max_articles_per_feed = 50
|
||||||
|
use_embedded_content = False
|
||||||
#encoding = 'latin1'
|
#encoding = 'latin1'
|
||||||
recursions = 1
|
recursions = 1
|
||||||
match_regexps = ['&page=[2-9]$']
|
match_regexps = ['&page=[2-9]$']
|
||||||
|
@ -470,8 +470,8 @@ class KoboReaderOutput(OutputProfile):
|
|||||||
|
|
||||||
description = _('This profile is intended for the Kobo Reader.')
|
description = _('This profile is intended for the Kobo Reader.')
|
||||||
|
|
||||||
screen_size = (540, 718)
|
screen_size = (536, 710)
|
||||||
comic_screen_size = (540, 718)
|
comic_screen_size = (536, 710)
|
||||||
dpi = 168.451
|
dpi = 168.451
|
||||||
fbase = 12
|
fbase = 12
|
||||||
fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24]
|
fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user