Check for dict

main
Bob Mottram 2024-03-13 20:00:55 +00:00
parent 133185d3e9
commit 24099d5025
1 changed files with 4 additions and 3 deletions

View File

@ -278,6 +278,7 @@ def html_profile_after_search(authorized: bool,
avatar_url = ''
if profile_json.get('icon'):
if isinstance(profile_json['icon'], dict):
if profile_json['icon'].get('url'):
url_str = get_url_from_post(profile_json['icon']['url'])
avatar_url = remove_html(url_str)