Fix #6145 (WSJ Recipe puts "Subscriber Content Read Preview" under the ToC with subscribed WSJ account)

This commit is contained in:
Kovid Goyal 2011-02-04 10:32:33 -07:00
parent ef20a98634
commit 64ed0890c6
2 changed files with 8 additions and 4 deletions

View File

@ -131,6 +131,7 @@ class WallStreetJournal(BasicNewsRecipe):
'description':desc, 'date':''})
self.log('\tFound WN article:', title)
self.log('\t\t', desc)
return articles
@ -160,14 +161,16 @@ class WallStreetJournal(BasicNewsRecipe):
title = self.tag_to_string(a).strip() + ' [%s]'%self.tag_to_string(meta)
url = 'http://online.wsj.com'+a['href']
desc = ''
p = container.find('p')
if p is not None:
for p in container.findAll('p'):
desc = self.tag_to_string(p)
if not 'Subscriber Content' in desc:
break
articles.append({'title':title, 'url':url,
'description':desc, 'date':''})
self.log('\tFound article:', title)
self.log('\t\t', desc)
return articles

View File

@ -143,9 +143,10 @@ class WallStreetJournal(BasicNewsRecipe):
title = self.tag_to_string(a).strip() + ' [%s]'%self.tag_to_string(meta)
url = 'http://online.wsj.com'+a['href']
desc = ''
p = container.find('p')
if p is not None:
for p in container.findAll('p'):
desc = self.tag_to_string(p)
if not 'Subscriber Content' in desc:
break
articles.append({'title':title, 'url':url,
'description':desc, 'date':''})