mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4032 (NYT wont complete)
This commit is contained in:
parent
5b6c033c40
commit
152738b691
@ -10,7 +10,7 @@ class IrishIndependent(BasicNewsRecipe):
|
|||||||
title = u'Irish Independent'
|
title = u'Irish Independent'
|
||||||
description = 'Irish and World news from Irelands Bestselling Daily Broadsheet'
|
description = 'Irish and World news from Irelands Bestselling Daily Broadsheet'
|
||||||
__author__ = 'Neil Grogan'
|
__author__ = 'Neil Grogan'
|
||||||
language = 'en_UK'
|
language = 'en_GB'
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
remove_tags_before = dict(id='article')
|
remove_tags_before = dict(id='article')
|
||||||
|
@ -14,7 +14,7 @@ class NYTimes(BasicNewsRecipe):
|
|||||||
|
|
||||||
title = 'New York Times Top Stories'
|
title = 'New York Times Top Stories'
|
||||||
__author__ = 'GRiker'
|
__author__ = 'GRiker'
|
||||||
language = _('English')
|
language = 'en'
|
||||||
description = 'Top Stories from the New York Times'
|
description = 'Top Stories from the New York Times'
|
||||||
|
|
||||||
# List of sections typically included in Top Stories. Use a keyword from the
|
# List of sections typically included in Top Stories. Use a keyword from the
|
||||||
|
@ -22,7 +22,10 @@ class NYTimes(BasicNewsRecipe):
|
|||||||
remove_tags_before = dict(id='article')
|
remove_tags_before = dict(id='article')
|
||||||
remove_tags_after = dict(id='article')
|
remove_tags_after = dict(id='article')
|
||||||
remove_tags = [dict(attrs={'class':['articleTools', 'post-tools', 'side_tool', 'nextArticleLink clearfix']}),
|
remove_tags = [dict(attrs={'class':['articleTools', 'post-tools', 'side_tool', 'nextArticleLink clearfix']}),
|
||||||
dict(id=['footer', 'toolsRight', 'articleInline', 'navigation', 'archive', 'side_search', 'blog_sidebar', 'side_tool', 'side_index']),
|
dict(id=['footer', 'toolsRight', 'articleInline',
|
||||||
|
'navigation', 'archive', 'side_search', 'blog_sidebar',
|
||||||
|
'side_tool', 'side_index',
|
||||||
|
'relatedArticles', 'relatedTopics', 'adxSponLink']),
|
||||||
dict(name=['script', 'noscript', 'style'])]
|
dict(name=['script', 'noscript', 'style'])]
|
||||||
encoding = 'cp1252'
|
encoding = 'cp1252'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
|
@ -849,7 +849,8 @@ class Manifest(object):
|
|||||||
try:
|
try:
|
||||||
data = etree.fromstring(data)
|
data = etree.fromstring(data)
|
||||||
except:
|
except:
|
||||||
data=data.replace(':=', '=').replace(':>', '>')
|
data = data.replace(':=', '=').replace(':>', '>')
|
||||||
|
data = data.replace('<http:/>', '')
|
||||||
try:
|
try:
|
||||||
data = etree.fromstring(data)
|
data = etree.fromstring(data)
|
||||||
except etree.XMLSyntaxError:
|
except etree.XMLSyntaxError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user