mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
2d00173e9e
@ -182,6 +182,10 @@ class NYTimes(BasicNewsRecipe):
|
|||||||
'mediaOverlay slideshow',
|
'mediaOverlay slideshow',
|
||||||
'headlinesOnly multiline flush',
|
'headlinesOnly multiline flush',
|
||||||
'wideThumb',
|
'wideThumb',
|
||||||
|
'video', #added 02-11-2011
|
||||||
|
'videoHeader',#added 02-11-2011
|
||||||
|
'articleInlineVideoHolder', #added 02-11-2011
|
||||||
|
'assetCompanionAd',
|
||||||
re.compile('^subNavigation'),
|
re.compile('^subNavigation'),
|
||||||
re.compile('^leaderboard'),
|
re.compile('^leaderboard'),
|
||||||
re.compile('^module'),
|
re.compile('^module'),
|
||||||
@ -664,7 +668,7 @@ class NYTimes(BasicNewsRecipe):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
#remove "Related content" bar
|
#remove "Related content" bar
|
||||||
runAroundsFound = soup.findAll('div',{'class':['articleInline runaroundLeft','articleInline doubleRule runaroundLeft','articleInline runaroundLeft firstArticleInline']})
|
runAroundsFound = soup.findAll('div',{'class':['articleInline runaroundLeft','articleInline doubleRule runaroundLeft','articleInline runaroundLeft firstArticleInline','articleInline runaroundLeft ']})
|
||||||
if runAroundsFound:
|
if runAroundsFound:
|
||||||
for runAround in runAroundsFound:
|
for runAround in runAroundsFound:
|
||||||
#find all section headers
|
#find all section headers
|
||||||
@ -672,6 +676,12 @@ class NYTimes(BasicNewsRecipe):
|
|||||||
if hlines:
|
if hlines:
|
||||||
for hline in hlines:
|
for hline in hlines:
|
||||||
hline.extract()
|
hline.extract()
|
||||||
|
|
||||||
|
#find all section headers
|
||||||
|
hlines = runAround.findAll('h6')
|
||||||
|
if hlines:
|
||||||
|
for hline in hlines:
|
||||||
|
hline.extract()
|
||||||
except:
|
except:
|
||||||
self.log("Error removing related content bar")
|
self.log("Error removing related content bar")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user