mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-23 20:11:11 +00:00
Added debugging of avatar/banner download
This commit is contained in:
parent
9b29471140
commit
210f2b9d54
2
twoot.py
2
twoot.py
|
@ -388,6 +388,7 @@ def update_profile(nitter_url, soup, sql, mast_password):
|
||||||
new_avatar_mime = new_avatar.headers['content-type'] if new_avatar.status_code == 200 else None
|
new_avatar_mime = new_avatar.headers['content-type'] if new_avatar.status_code == 200 else None
|
||||||
if new_avatar.status_code != 200:
|
if new_avatar.status_code != 200:
|
||||||
logging.error("Could not download avatar image from " + nitter_url + new_avatar_url)
|
logging.error("Could not download avatar image from " + nitter_url + new_avatar_url)
|
||||||
|
logging.error("Status code: " + new_avatar.status_code)
|
||||||
else:
|
else:
|
||||||
logging.debug("Avatar image downloaded")
|
logging.debug("Avatar image downloaded")
|
||||||
|
|
||||||
|
@ -397,6 +398,7 @@ def update_profile(nitter_url, soup, sql, mast_password):
|
||||||
new_banner_mime = new_banner.headers['content-type'] if new_banner.status_code == 200 else None
|
new_banner_mime = new_banner.headers['content-type'] if new_banner.status_code == 200 else None
|
||||||
if new_banner.status_code != 200:
|
if new_banner.status_code != 200:
|
||||||
logging.error("Could not download banner image from " + nitter_url + new_banner_url)
|
logging.error("Could not download banner image from " + nitter_url + new_banner_url)
|
||||||
|
logging.error("Status code: " + new_avatar.status_code)
|
||||||
else:
|
else:
|
||||||
logging.debug("Banner image downloaded")
|
logging.debug("Banner image downloaded")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user