Skip to content

Commit

Permalink
Fix Douyin API response empty data
Browse files Browse the repository at this point in the history
Pls check the follow issues from other repository:

- Johnserf-Seed/TikTokDownload#269

- Evil0ctal/Douyin_TikTok_Download_API#127
  • Loading branch information
Evil0ctal authored Dec 22, 2022
1 parent c3a69d3 commit 1518b47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bilix/api/douyin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ async def get_video_info(client: httpx.AsyncClient, url: str) -> VideoInfo:
key = key.groups()[0]
else:
key = re.search(r"modal_id=(\d+)", url).groups()[0]
res = await req_retry(client, f'https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids={key}')
res = await req_retry(client, f'https://www.iesdouyin.com/aweme/v1/web/aweme/detail/?aweme_id={key}')
data = json.loads(res.text)
data = data['item_list'][0]
data = data['aweme_detail']
# 视频标题
title = legal_title(data['desc'])
# 视频作者昵称
Expand Down

0 comments on commit 1518b47

Please sign in to comment.