mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #6145 (WSJ Recipe puts "Subscriber Content Read Preview" under the ToC with subscribed WSJ account)
This commit is contained in:
parent
ef20a98634
commit
64ed0890c6
@ -131,6 +131,7 @@ class WallStreetJournal(BasicNewsRecipe):
|
|||||||
'description':desc, 'date':''})
|
'description':desc, 'date':''})
|
||||||
|
|
||||||
self.log('\tFound WN article:', title)
|
self.log('\tFound WN article:', title)
|
||||||
|
self.log('\t\t', desc)
|
||||||
|
|
||||||
return articles
|
return articles
|
||||||
|
|
||||||
@ -160,14 +161,16 @@ class WallStreetJournal(BasicNewsRecipe):
|
|||||||
title = self.tag_to_string(a).strip() + ' [%s]'%self.tag_to_string(meta)
|
title = self.tag_to_string(a).strip() + ' [%s]'%self.tag_to_string(meta)
|
||||||
url = 'http://online.wsj.com'+a['href']
|
url = 'http://online.wsj.com'+a['href']
|
||||||
desc = ''
|
desc = ''
|
||||||
p = container.find('p')
|
for p in container.findAll('p'):
|
||||||
if p is not None:
|
|
||||||
desc = self.tag_to_string(p)
|
desc = self.tag_to_string(p)
|
||||||
|
if not 'Subscriber Content' in desc:
|
||||||
|
break
|
||||||
|
|
||||||
articles.append({'title':title, 'url':url,
|
articles.append({'title':title, 'url':url,
|
||||||
'description':desc, 'date':''})
|
'description':desc, 'date':''})
|
||||||
|
|
||||||
self.log('\tFound article:', title)
|
self.log('\tFound article:', title)
|
||||||
|
self.log('\t\t', desc)
|
||||||
|
|
||||||
return articles
|
return articles
|
||||||
|
|
||||||
|
@ -143,9 +143,10 @@ class WallStreetJournal(BasicNewsRecipe):
|
|||||||
title = self.tag_to_string(a).strip() + ' [%s]'%self.tag_to_string(meta)
|
title = self.tag_to_string(a).strip() + ' [%s]'%self.tag_to_string(meta)
|
||||||
url = 'http://online.wsj.com'+a['href']
|
url = 'http://online.wsj.com'+a['href']
|
||||||
desc = ''
|
desc = ''
|
||||||
p = container.find('p')
|
for p in container.findAll('p'):
|
||||||
if p is not None:
|
|
||||||
desc = self.tag_to_string(p)
|
desc = self.tag_to_string(p)
|
||||||
|
if not 'Subscriber Content' in desc:
|
||||||
|
break
|
||||||
|
|
||||||
articles.append({'title':title, 'url':url,
|
articles.append({'title':title, 'url':url,
|
||||||
'description':desc, 'date':''})
|
'description':desc, 'date':''})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user