From: Jan Szejko Date: Mon, 18 Dec 2017 10:49:03 +0000 (+0100) Subject: update to new flickr metadata format X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/519e5664528bc9dd8cc7ff034fb9c2148a6db063?ds=inline update to new flickr metadata format --- 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 {