fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91dd7bd
)
update to new flickr metadata format
author
Jan Szejko
<janek37@gmail.com>
Mon, 18 Dec 2017 10:49:03 +0000
(11:49 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Mon, 18 Dec 2017 10:49:03 +0000
(11:49 +0100)
apps/cover/utils.py
patch
|
blob
|
history
diff --git
a/apps/cover/utils.py
b/apps/cover/utils.py
index
80ee0b7
..
f1cdcc9
100755
(executable)
--- 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 {