Advertisement
xtekky_

Untitled

Jul 27th, 2022
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.20 KB | None | 0 0
  1. import requests, time, json, urllib.parse, random, threading
  2.  
  3.  
  4. def view(video):
  5.  
  6.     version = random.choice(
  7.         [247, 312, 322, 357, 358, 415, 422, 444, 466]
  8.     )
  9.     device = random.choice(
  10.         ["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"]
  11.     )
  12.    
  13.     host = random.choice(
  14.         ["api16.tiktokv.com", "api.tiktokv.com", "api19.tiktokv.com", "api21.tiktokv.com"]
  15.     )
  16.  
  17.     params = urllib.parse.urlencode(
  18.         {
  19.             "app_language": "fr",
  20.             "iid": "7096914671404861186",
  21.             "device_id": "6790033197118096902",
  22.             "channel": "googleplay",
  23.             "device_type": device,
  24.             "ac": "wifi",
  25.             "os_version": random.randint(5, 11),
  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.     response = requests.post(
  38.         url = (
  39.             "https://"
  40.                 + host
  41.                 + "/aweme/v1/aweme/stats"
  42.                 + f"?{params}"
  43.         ),
  44.         data = (
  45.             f'&manifest_version_code={version}'
  46.                 + f'&update_version_code={version}0'
  47.                 + '&play_delta=1'
  48.                 + f'&item_id={video}'
  49.                 + f'&version_code={version}'
  50.                 + '&aweme_type=0'
  51.         ),
  52.         headers = {
  53.             "host": host,
  54.             "connection": "keep-alive",
  55.             "accept-encoding": "gzip",
  56.             "x-ss-req-ticket": str(int(time.time())),
  57.             "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  58.             "user-agent": f"com.ss.android.ugc.trill/{version} (Linux; U; Android 11; fr_FR; {device}; Build/RP1A.200720.012; Cronet/58.0.2991.0)"
  59.         }
  60.     )
  61.  
  62.     print(response.json())
  63.  
  64. for x in range (100):
  65.     threading.Thread(
  66.         target = view,
  67.         args = [
  68.             7121488379333725446
  69.         ]
  70.     ).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement