当前位置:网站首页>Tiktok protocol interface, protocol analysis add_ x_ bogus add_ signature
Tiktok protocol interface, protocol analysis add_ x_ bogus add_ signature
2022-07-18 20:23:00 【Q44804487】
Live broadcast attention interface :https://live.douyin.com/webcast/user/relation/update/
Live barrage interface :https://live.douyin.com/webcast/room/chat/
Video like interface :https://www.douyin.com/aweme/v1/web/commit/item/digg/
Video comment interface :https://www.douyin.com/aweme/v1/web/comment/publish
Live heartbeat interface :https://live.douyin.com/webcast/im/fetch/
since 6 After the month, the risk control of Tiktok increases a lot For the weight sum of numbers IP There are great restrictions
Sometimes numbers have weight IP No, it won't show people
When testing, many situations are due to IP no way We thought it was a code problem
IP The quantity with number is at the beginning 1IP belt 200 Up to now 1IP belt 5 individual Costs are also increasing
In fact, the biggest problem of the operation agreement on the list is not in the agreement And in the No At present, it is estimated that the private number that can be used can also be pushed locally
If you are interested in Tiktok, you can communicate together
Code snippet attached
def webcast_im_fetch_index(self):
if self.proxy is not None:
proxies = {
"http": self.proxy,
"https": self.proxy
}
else:
# proxies = None
if self.proxy_bl:
proxies = {
"http": self.im_proxy,
"https": self.im_proxy
}
self.proxy_bl = False
else:
proxies = None
headers = {
'user-agent': self.user_agent,
'accept': '*/*',
'referer': 'https://live.douyin.com/' + self.web_rid,
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
'sec-ch-ua-mobile': '?0',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
}
ms_token = self.session.cookies.get_dict().get('msToken')
browser_version = str(self.user_agent).replace('Mozilla/', '')
url = f'https://live.douyin.com/webcast/im/fetch/?aid=6383&app_name=douyin_web&browser_language=zh-CN&browser_name=Chrome&browser_online=true&browser_platform=Win32&browser_version={quote_plus(browser_version)}&cookie_enabled=true&cursor={quote_plus(self.cursor)}&device_platform=web&did_rule=3&engine_name=Blink&engine_version=None&fetch_rule=1&identity=audience&internal_ext={quote_plus(self.internal_ext)}&last_rtt={self.last_rtt}&live_id=1&resp_content_type=protobuf&room_id={self.room_id}&screen_height=1080&screen_width=1920&tz_name=Asia%2FShanghai&version_code=180800&version_name=18.8.0&msToken={ms_token}'
url = self.add_x_bogus(url)
url = self.add_signature(url, 'live.douyin.com/' + self.web_rid)
response = self.session.get(url=url, headers=headers, proxies=proxies, verify=self.verify)
response.encoding = 'UTF-8'
return_data = response.text
logger.warning(return_data)
if return_data == "":
logger.error(response.text)
logger.error(' Heartbeat packet returned empty ')
return 2
else:
response_content = response.content
WebcastMessage = WebcastMessage_pb2.WebCastMessage()
WebcastMessage.ParseFromString(response_content)
self.cursor = WebcastMessage.cursor
self.internal_ext = WebcastMessage.internal_ext
if self.last_rtt == '0':
self.last_rtt = '-1'
else:
self.last_rtt = str(random.randint(101, 399))
if self.cursor is None and self.cursor is None:
return 1
else:
return 0
边栏推荐
- Horizon 8 test environment deployment (8): app volumes managers load balancing configuration
- The first large-scale Chinese video multimodal similarity data set
- 七牛云的使用
- Horizon 8 测试环境部署(5): UAG 部署及负载均衡配置-1
- 如何使用Fiddler抓包某奇艺小程序视频下载
- Part II FPGA digital signal processing_ Verilog design of parallel FIR filter
- Mental poker revised learning notes
- volatile的用法详解
- 并行及分布式框架
- leetcode 8. String to Integer (atoi)(string)
猜你喜欢

Single source shortest path

Interview micro service

第一个大规模中文视频多模态相似度数据集

11. Maximum value of sliding window - double ended queue of important structure

Vivado ROM IP core

Share constantly, tread the waves | developers say · dtalk mid year appreciation

The first large-scale Chinese video multimodal similarity data set

Horizon 8 test environment deployment (8): app volumes managers load balancing configuration

淘特商品详情API接口(商品销量接口,商品价格排序接口,回头客常买接口,APP商品详情接口,商品属性接口)

wallys/QCA9880/ WiFi 5 (802.11ac) mini PCIe cards deliver higher Tx power and performance (Sponsored
随机推荐
Virtualization architecture
php 计算一年多少周,每周的起止日期
[AI application] detailed parameters of Intel (R) Xeon (R) silver 4216 CPU @ 2.10GHz
graph theory
LeetCode第82场双周赛
wallys/QCA9880/ WiFi 5 (802.11ac) mini PCIe cards deliver higher Tx power and performance (Sponsored
Convolution structure and its calculation
如何使用Fiddler抓包某奇艺小程序视频下载
OpenGL ES学习(5)——光照
接口测试—校验参数合法性/容错性测试
OpenGL es learning (5) - Lighting
并行及分布式框架
leetcode 8. String to Integer (atoi)(string)
NC20566 [SCOI2010]游戏
Payment process interview ideas
Activity -- startactivityforresult() - return data to the previous activity method record
Récemment trouvé la Bibliothèque d'animation lottie
MySQL六十六问,两万字+五十图详解!有点六!
World Tour Finals 2019 D - Distinct Boxes 题解
Still using system Currenttimemillis() statistics code time-consuming? Too low!