From fde5b4020fdb11fff1c00f13ed34036ac3a31e4b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 Mar 2017 08:39:44 +0530 Subject: [PATCH] Handle curretn NEw Yorker using an animated GIF for the cover --- recipes/new_yorker.recipe | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/new_yorker.recipe b/recipes/new_yorker.recipe index fba4e8295b..3cb6c3d10d 100644 --- a/recipes/new_yorker.recipe +++ b/recipes/new_yorker.recipe @@ -44,7 +44,10 @@ class NewYorker(BasicNewsRecipe): if ph is not None: img = ph.find('img') if img is not None: - self.cover_url = img['data-src'] + try: + self.cover_url = img['data-src'] + except KeyError: + self.cover_url = img['src'] articles = [] current_section = 'Current Issue' feeds = []