From 50adaa402c556709617e469dae5c2f1241899784 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 17 Sep 2018 18:44:03 +0530 Subject: [PATCH] Fix cover download for WSJ subscriber recipe --- recipes/wsj.recipe | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe index 853fd44140..b72be2b1fa 100644 --- a/recipes/wsj.recipe +++ b/recipes/wsj.recipe @@ -98,19 +98,12 @@ class WSJ(BasicNewsRecipe): return soup def get_cover_url(self): - cover = 'https://vir.wsj.net/fp/cdn/fp/assets/images/WSJ_A1.jpg' - br = BasicNewsRecipe.get_browser(self) - try: - br.open(cover) - except: - index = 'http://en.kiosko.net/us/np/wsj.html' - soup = self.index_to_soup(index) - for image in soup.findAll('img', src=True): - if image['src'].endswith('750.jpg'): - return image['src'] - self.log("\nCover unavailable") - cover = None - return cover + index = 'http://en.kiosko.net/us/np/wsj.html' + soup = self.index_to_soup(index) + for image in soup.findAll('img', src=True): + if image['src'].endswith('750.jpg'): + return image['src'] + self.log("\nCover unavailable") def get_browser(self): # To understand the signin logic read signin.js from