mirror of https://gitlab.com/bashrc2/epicyon
Check that icon is a dict
parent
268d63991d
commit
cae87ac553
12
person.py
12
person.py
|
@ -1995,10 +1995,14 @@ def get_person_avatar_url(base_dir: str, person_url: str,
|
||||||
return im_path
|
return im_path
|
||||||
|
|
||||||
if person_json.get('icon'):
|
if person_json.get('icon'):
|
||||||
if person_json['icon'].get('url'):
|
if isinstance(person_json['icon'], dict):
|
||||||
url_str = get_url_from_post(person_json['icon']['url'])
|
if person_json['icon'].get('url'):
|
||||||
if '.svg' not in url_str.lower():
|
url_str = get_url_from_post(person_json['icon']['url'])
|
||||||
return remove_html(url_str)
|
if '.svg' not in url_str.lower():
|
||||||
|
return remove_html(url_str)
|
||||||
|
else:
|
||||||
|
print('DEBUG: get_person_avatar_url icon is not a dict ' +
|
||||||
|
str(person_json['icon']))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue