Shorten the IG url as it is not clickable either + bug fix

This commit is contained in:
Bofh 2021-02-08 11:06:51 +01:00
parent 5e1631286d
commit e888ee88da
1 changed files with 3 additions and 4 deletions

View File

@ -282,10 +282,9 @@ def pixelfed_setpic(acc_id, pic_url, count=0):
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)
name = accdata['name'] + ' [Mirror]'
if count == 0:
bio = 'Mirrored from Instagram: instagram.com/{} | {}'.format(acc_id, bio)
count += 1
pixelfed_login(acc_id)
@ -294,7 +293,7 @@ def pixelfed_setinfo(acc_id, bio, website, count=0):
_, _token = pixelfed_token_url('/settings/home', accdata['cookie'])
r = requests.post( 'https://'+config()['instance']+'/settings/home',\
data={
'_token': _token, 'name': accdata['name'],
'_token': _token, 'name': name,
'website': website, 'bio': bio, 'language': 'en'
},
cookies=accdata['cookie']