diff --git a/igmirror.py b/igmirror.py index 7a2d520..7149b0d 100644 --- a/igmirror.py +++ b/igmirror.py @@ -280,6 +280,8 @@ def pixelfed_setpic(acc_id, pic_url, count=0): return True def pixelfed_setinfo(acc_id, bio, website, count=0): + accdata = db_get('accounts', acc_id) + name = accdata['name'] if count == 0: bio = 'Mirrored from Instagram: https://www.instagram.com/{} | {}'.format(acc_id, bio) @@ -288,7 +290,6 @@ def pixelfed_setinfo(acc_id, bio, website, count=0): count += 1 pixelfed_login(acc_id) - accdata = db_get('accounts', acc_id) print('I| setting account-info for "{}" '.format(acc_id), end="") _, _token = pixelfed_token_url('/settings/home', accdata['cookie']) r = requests.post( 'https://'+config()['instance']+'/settings/home',\