【go】某音作品api接口分析
请教一下,我想抓抖音的视频练习代码,这个接口
作品地址:https://www.iesdouyin.com/share/user/60179369788?u_code=296mca7dcjh6&utm_campaign=client_share&app=aweme&utm_medium=ios&tt_from=copy&utm_source=copy
api 接口https://www.iesdouyin.com/web/api/v2/aweme/post/?user_id=60179369788&count=21&max_cursor=0&aid=1128&_signature=ieLXVxAc1PdnpIgcrnob.Ini10&dytk=ab518b74204432b916e63cfc2449ee0d
我对请求头进行模拟 参数 header cookie都一样, 却得到空数组,是哪里还缺少东西吗?
request.Header.Set("cookie", "tt_webid=6703695667321964035")request.Header.Set("referer", "https://www.iesdouyin.com/share/user/60179369788?u_code=296mca7dcjh6&utm_campaign=client_share&app=aweme&utm_medium=ios&tt_from=copy&utm_source=copy")
request.Header.Set("accept", "application/json")
request.Header.Set("x-requested-with", "XMLHttpRequest")
request.Header.Set("user-agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1")
注意参数里的_signature参数,是随着时间变化的
参考:
https://blog.csdn.net/freekin...
需要_signature的破解,你可以参考文章:https://blog.csdn.net/swukong...,
如果不想破解,可以考虑在ChromeDriver上跑:
https://www.iesdouyin.com/share/user/60179369788?u_code=296mca7dcjh6&utm_campaign=client_share&app=aweme&utm_medium=ios&tt_from=copy&utm_source=copy
跑起来后,采用js注入方式,修改请求,同时将结果console.log,然后获取出来,不过这种速度会慢一点
回答
以上是 【go】某音作品api接口分析 的全部内容, 来源链接: utcz.com/a/113120.html