From 519e5664528bc9dd8cc7ff034fb9c2148a6db063 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Mon, 18 Dec 2017 11:49:03 +0100 Subject: [PATCH] update to new flickr metadata format --- apps/cover/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/cover/utils.py b/apps/cover/utils.py index 80ee0b7e..f1cdcc96 100755 --- a/apps/cover/utils.py +++ b/apps/cover/utils.py @@ -52,7 +52,7 @@ def get_flickr_data(url): m = re.search(r'modelExport: (\{.*\})', html) try: assert m - download_url = 'https:' + json.loads(m.group(1))['photo-models'][0]['sizes']['o']['url'] + download_url = 'https:' + json.loads(m.group(1))['main']['photo-models'][0]['sizes']['o']['url'] except (AssertionError, ValueError, IndexError, KeyError): raise FlickrError('Error reading image URL.') return { -- 2.20.1