🐱修改了TikTok API的回执内容以支持iOS快捷指令
This commit is contained in:
parent
5e3692635c
commit
5c08f31eda
1 changed files with 13 additions and 2 deletions
15
TikTok_ZH.py
15
TikTok_ZH.py
|
|
@ -232,8 +232,19 @@ def webapi():
|
|||
# 校验是否为TikTok链接
|
||||
if 'tiktok.com' in post_content:
|
||||
try:
|
||||
js = get_video_info_tiktok(post_content)
|
||||
return js
|
||||
video_info = get_video_info_tiktok(post_content)
|
||||
nwm_link = tiktok_nwm(post_content)
|
||||
# 返回TikTok信息json
|
||||
return jsonify(Status='Success', Type='Video', video_url=nwm_link,
|
||||
video_music=video_info['music']['playUrl'],
|
||||
video_title=video_info['desc'], video_author=video_info['author'],
|
||||
video_author_id=video_info['authorId'], original_url=post_content,
|
||||
music_title=video_info['music']['title'], music_author=video_info['music']['authorName'],
|
||||
followerCount=video_info['authorStats']['followingCount'],
|
||||
followingCount=video_info['authorStats']['followingCount'],
|
||||
likes_recived=video_info['authorStats']['heart'],
|
||||
video_count=video_info['authorStats']['videoCount'],
|
||||
water_mark_url=video_info['video']['playAddr'])
|
||||
except Exception:
|
||||
return jsonify(Status='Failed!', Reason='Check the link!')
|
||||
# 如果关键字不存在则判断为抖音链接
|
||||
|
|
|
|||
Loading…
Reference in a new issue