Python抖音抓取用户信息

  1. import requests
  2. url = 'http://106.12.193.246:8000/sign'
  3. url2 = 'https://aweme.snssdk.com/aweme/v1/user/?user_id=47023191228&retry_type=no_retry&ac=wifi&channel=wandoujia_aweme1&aid=1128&app_name=aweme&version_code=580&version_name=5.8.0&device_platform=android&ssmix=a&device_type=OPPO+R11+Plus&device_brand=OPPO&language=zh&os_api=22&os_version=5.1.1&manifest_version_code=580&resolution=720*1280&dpi=192&update_version_code=5800&mcc_mnc=46002'
  4.  
  5. data = {
  6. "url": url2,
  7. "device_id":"70433914677",
  8. "iid":"99003389687"
  9. }
  10. response = requests.post(url, data=data).json()
  11. url2 = response.get("url")
  12. time = response.get("time")
  13. gorgon = response.get("x-gorgon")
  14.  
  15. headers = {
  16. "X-Khronos": str(time),
  17. "X-Gorgon": gorgon,
  18. "User-Agent": "okhttp/3.10.0.1",
  19. "Cookie": "odintt=1"
  20. }
  21. print(headers)
  22. response = requests.get(url2, headers=headers,verify=False)
  23. print(response.text)

https://github.com/coder-fly/douyin_sign

  1. Joe说道:

    Hi,能私下交流一下吗?

发表评论

邮箱地址不会被公开。 必填项已用*标注