Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests, time, json, urllib.parse, random, threading
- def view(video):
- # [247, 312, 322, 357, 358, 415, 422, 444, 466]
- version = random.choice(
- [247, 312, 322, 357, 358, 415, 422, 444, 466]
- )
- device = random.choice(
- ["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"]
- )
- params = urllib.parse.urlencode(
- {
- "app_language": "fr",
- "iid": "7096914671404861186",
- "device_id": "6790033197118096902",
- "channel": "googleplay",
- "device_type": device, #"SM-N970F",
- "ac": "wifi",
- # "mcc_mnc": "21407",
- "os_version": random.randint(5, 11), #"10",
- "version_code": version,
- "app_name": "trill",
- "device_brand": "samsung",
- "ssmix": "a",
- "device_platform": "android",
- "aid": 1180,
- "as": "a1iosdfgh",
- "cp": "androide1",
- }
- )
- payload = (
- f'&manifest_version_code={version}'
- + f'&update_version_code={version}0'
- + '&play_delta=1'
- + f'&item_id={video}'
- + f'&version_code={version}'
- + '&aweme_type=0'
- )
- headers = {
- "host": "api.tiktokv.com",
- "connection": "keep-alive",
- "accept-encoding": "gzip",
- "x-ss-req-ticket": str(int(time.time())),
- "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
- "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)"
- }
- url = (
- "https://"
- + "api.tiktokv.com"
- + "/aweme/v1/aweme/stats"
- + f"?{params}"
- )
- response = requests.post(url, data=payload, headers=headers)
- print(response.json())
- for x in range (5):
- threading.Thread(
- target = view,
- args = [
- 7121488379333725446
- ]
- ).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement