mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-27 14:01:13 +00:00
Split account update in 2 calls
This commit is contained in:
parent
be1c1c7db7
commit
503dc42f25
5
twoot.py
5
twoot.py
|
@ -256,7 +256,10 @@ def update_profile(nitter_url, soup, sql, mast_password):
|
||||||
# Update profile on Mastodon
|
# Update profile on Mastodon
|
||||||
# media.content, mime_type=media.headers['content-type']
|
# media.content, mime_type=media.headers['content-type']
|
||||||
try:
|
try:
|
||||||
mastodon.account_update_credentials(avatar=new_avatar_img, avatar_mime_type=new_avatar_mime, header=new_banner_img, header_mime_type=new_banner_mime)
|
if new_avatar_img is not None:
|
||||||
|
mastodon.account_update_credentials(avatar=new_avatar_img, avatar_mime_type=new_avatar_mime)
|
||||||
|
if new_banner_img is not None:
|
||||||
|
mastodon.account_update_credentials(header=new_banner_img, header_mime_type=new_banner_mime)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error("Could not update profile")
|
logging.error("Could not update profile")
|
||||||
logging.error(e)
|
logging.error(e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user