douyin-signature icon indicating copy to clipboard operation
douyin-signature copied to clipboard

Not get all user videos

Open myxinhgai opened this issue 5 years ago • 3 comments

Hello thank you for your code, i have use your code and generated signature but when i download all videos of user that have 100 videos, i just get around 12-17 videos, could you please have me get the answer? Thank you so much

myxinhgai avatar Apr 15 '20 18:04 myxinhgai

同样的问题,改count数也最多只能获取36条视频的

fky1990 avatar Apr 17 '20 19:04 fky1990

同样的问题,改count数也最多只能获取36条视频的 Hello thank you for your code, i have use your code and generated signature but when i download all videos of user that have 100 videos, i just get around 12-17 videos, could you please have me get the answer? Thank you so much

影响到请求内容的参数是max_cursor。把上一次请求获得的max_cursor(json.loads(r.text).get('max_cursor))设置为下一次请求的参数即可

url = "https://www.iesdouyin.com/web/api/v2/aweme/post/?user_id={}&sec_uid=&count=21&max_cursor={}&aid=1128&_signature={}".format(user_id, json.loads(r.text).get('max_cursor), sign) requests.get(url,headers=headers,verify=False,proxies=proxies)

zhangchj9 avatar May 21 '20 01:05 zhangchj9

And if you have got all the videos from one user, then json.loads(r.text).get('has_more') will be 'false'.

zhangchj9 avatar May 21 '20 01:05 zhangchj9