From 6bc3adbd331d4f4245be5b2b639703666e7b21a1 Mon Sep 17 00:00:00 2001 From: "Get your own 'tots. Geez!" Date: Tue, 16 Feb 2016 14:14:41 -0700 Subject: [PATCH] Resolve image caused uncaught exception. Implement Webmoshers ( https://github.com/webmosher ) fix for issue #2485 per https://github.com/rembo10/headphones/issues/2485#issuecomment-180047097 --- headphones/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/cache.py b/headphones/cache.py index 166d5577..219be7fb 100644 --- a/headphones/cache.py +++ b/headphones/cache.py @@ -116,7 +116,7 @@ class Cache(object): return None for image in images: - if image['size'] == 'medium': + if image['size'] == 'medium' and '#text' in image: thumb_url = image['#text'] break