Advertisement
xtekky_

Untitled

Jul 27th, 2022
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.24 KB | None | 0 0
  1. import requests, time, json, urllib.parse
  2.  
  3. url = "https://api-t2.tiktokv.com/aweme/v1/aweme/stats/"
  4.  
  5. querystring = {
  6.     "app_language": "fr",
  7.     "iid": "7096914671404861186",
  8.     "channel": "googleplay",
  9.     "device_type": "SM-N970F",
  10.     "ac": "wifi",
  11.     "device_id": "6790033197118096902",
  12.     "mcc_mnc": "21407",
  13.     "os_version": "11",
  14.     "version_code": "247",
  15.     "app_name": "trill",
  16.     "device_brand": "samsung",
  17.     "ssmix": "a",
  18.     "device_platform": "android",
  19.     "aid": "1180",
  20.     "as": "a1iosdfgh",
  21.     "cp": "androide1",
  22. }
  23.  
  24. payload = urllib.parse.urlencode(
  25.     {
  26.         "item_id": "7124373917690596614",
  27.         "_rticket": str(int(time.time())) + "000", #1658943304806",
  28.         "aweme_type": "0"
  29.     }
  30. )
  31.  
  32. headers = {
  33.     "host": "api-t2.tiktokv.com",
  34.     "connection": "keep-alive",
  35.     "accept-encoding": "gzip",
  36.     "x-ss-req-ticket": str(int(time.time())) + "000", #1658943304818",
  37.     "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  38.     "user-agent": "com.ss.android.ugc.trill/247 (Linux; U; Android 11; fr_FR; SM-N970F; Build/RP1A.200720.012; Cronet/58.0.2991.0)"
  39. }
  40.  
  41. response = requests.post(url, data=payload, headers=headers, params=querystring)
  42.  
  43. print(response.json())
  44.  
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement