Advertisement
xtekky_

Untitled

Jul 27th, 2022
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.14 KB | None | 0 0
  1. import requests, time, json, urllib.parse, random, threading
  2.  
  3.  
  4. def view(video):
  5.    
  6.     # [247, 312, 322, 357, 358, 415, 422, 444, 466]
  7.  
  8.     version = random.choice(
  9.         [247, 312, 322, 357, 358, 415, 422, 444, 466]
  10.     )
  11.     device = random.choice(
  12.         ["SM-G9900", "sm-g950f", "SM-A136U1", "SM-M225FV", "SM-E426B", "SM-M526BR", "SM-M326B", "SM-A528B", "SM-F711B", "SM-F926B", "SM-A037G", "SM-A225F", "SM-M325FV", "SM-A226B", "SM-M426B", "SM-A525F"]
  13.  
  14.     )
  15.  
  16.     params = urllib.parse.urlencode(
  17.         {
  18.             "app_language": "fr",
  19.             "iid": "7096914671404861186",
  20.             "device_id": "6790033197118096902",
  21.             "channel": "googleplay",
  22.             "device_type": device, #"SM-N970F",
  23.             "ac": "wifi",
  24.             # "mcc_mnc": "21407",
  25.             "os_version": random.randint(5, 11), #"10",
  26.             "version_code": version,
  27.             "app_name": "trill",
  28.             "device_brand": "samsung",
  29.             "ssmix": "a",
  30.             "device_platform": "android",
  31.             "aid": 1180,
  32.             "as": "a1iosdfgh",
  33.             "cp": "androide1",
  34.         }
  35.     )
  36.    
  37.     payload = (
  38.         f'&manifest_version_code={version}'
  39.         + f'&update_version_code={version}0'
  40.         + '&play_delta=1'
  41.         + f'&item_id={video}'
  42.         + f'&version_code={version}'
  43.         + '&aweme_type=0'
  44.     )
  45.     headers = {
  46.         "host": "api.tiktokv.com",
  47.         "connection": "keep-alive",
  48.         "accept-encoding": "gzip",
  49.         "x-ss-req-ticket": str(int(time.time())),
  50.         "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  51.         "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)"
  52.     }
  53.    
  54.     url = (
  55.         "https://"
  56.             + "api.tiktokv.com"
  57.             + "/aweme/v1/aweme/stats"
  58.             + f"?{params}"
  59.     )
  60.  
  61.     response = requests.post(url, data=payload, headers=headers)
  62.  
  63.     print(response.json())
  64.  
  65. for x in range (5):
  66.     threading.Thread(
  67.         target = view,
  68.         args = [
  69.             7121488379333725446
  70.         ]
  71.     ).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement