🐛 修复 twitter 视频地址

This commit is contained in:
xtaodada 2022-10-03 01:30:20 +08:00
parent 8b30d1c4ef
commit 321cbb2653
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -119,7 +119,10 @@ def get_twitter_status(url_json):
media_list.append(i.video_info['variants'][0]['url'])
else:
media_model.append('video')
media_list.append(i.video_info['variants'][1]['url'])
for f in i.video_info['variants']:
if f['content_type'] == 'video/mp4':
media_list.append(f['url'])
break
try:
media_alt_list.append(i.ext_alt_text)
except: