From e762bb89641e6a640dc0ec221b29792d2c34f307 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 14 Sep 2011 11:28:07 -0600 Subject: [PATCH] Fix #850167 (Wall Street Journal Newsfetch Script does not capture cover image) --- recipes/wsj.recipe | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe index 7a044aa5a7..f01e7ae858 100644 --- a/recipes/wsj.recipe +++ b/recipes/wsj.recipe @@ -94,9 +94,11 @@ class WallStreetJournal(BasicNewsRecipe): if date is not None: self.timefmt = ' [%s]'%self.tag_to_string(date) - cov = soup.find('a', attrs={'class':'icon pdf'}, href=True) + cov = soup.find('div', attrs={'class':'itpSectionHeaderPdf'}) if cov is not None: - self.cover_url = cov['href'] + a = cov.find('a', href=True) + if a is not None: + self.cover_url = a['href'] feeds = [] div = soup.find('div', attrs={'class':'itpHeader'})