|
|

楼主 |
发表于 2019-6-25 08:50:56
|
显示全部楼层
- import requests
- headers = {
- 'accept':'application/json',
- 'accept-encoding':'gzip, deflate, br',
- 'accept-language':'zh-CN,zh;q=0.9',
- 'cookie':'tt_webid=6705869807841183240; _ba=BA0.2-20190624-5199e-t3BC2JjoAhPqDNy68Zom; _ga=GA1.2.1257055546.1561331999; _gid=GA1.2.5685481.1561331999',
- 'referer':'https://www.iesdouyin.com/share/user/58403943903',
- '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',
- 'x-requested-with':'XMLHttpRequest'
-
- }
- requests.packages.urllib3.disable_warnings()
- r = requests.get('https://www.iesdouyin.com/web/api/v2/aweme/post/?user_id=58403943903&count=21&max_cursor=0&aid=1128&_signature=f758TxASIrF28gZaG3lVoX--fF&dytk=24055961db18626d9c43a0cb48dc2832',headers=headers,verify=False)
- print(r.status_code)
- r.encoding = r.apparent_encoding
- print(r.text)
复制代码
分析阶段,写了一个粗略的代码,大概就是这个问题,没有正常访问到request的json数据,不知道为啥。 |
|