Skip to content

Commit 56ac934

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents ca6a302 + 714a3dc commit 56ac934

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.en.md

+23-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The endpoints with the 🔒 icon in the interface document need to carry the API
3131

3232
> Generate API Token
3333
34-
The steps to obtain API Token are also very simple, you only need to log in to our user backend[Stay tuned](https://tikhub.io/users/api_keys), then click on the left`API Keys`You can generate your own API Token, and at the same time, you can customize the permissions of the API Token (`Scopes`), you can also set the expiration date of the API Token (`Expire Date`), you can also manually temporarily close the API Token (`Status`)。
34+
The steps to obtain API Token are also very simple. You only need to log in to our user backend.[Stay tuned](https://tikhub.io/users/api_keys), then click on the left`API Keys`You can generate your own API Token, and at the same time, you can customize the permissions of the API Token (`Scopes`), you can also set the expiration date of the API Token (`Expire Date`), you can also manually temporarily close the API Token (`Status`)。
3535

3636
> Used on the API documentation web page
3737
@@ -75,7 +75,7 @@ client = Client(base_url="https://api.tikhub.io",
7575
proxies=None,
7676
max_retries=3,
7777
max_connections=50,
78-
timeout=10,
78+
timeout=60,
7979
max_tasks=50)
8080
```
8181

@@ -135,6 +135,12 @@ self.CaptchaSolver = CaptchaSolver(self.client)
135135

136136
# Xigua Video APP V2 | 西瓜视频APP V2
137137
self.XiguaAppV2 = XiguaAppV2(self.client)
138+
139+
# XiaoHongShu Web | 小红书网页端
140+
self.XiaohongshuWeb = XiaohongshuWeb(self.client)
141+
142+
# KuaiShou Web | 快手网页端
143+
self.KuaishouWeb = KuaishouWeb(self.client)
138144
```
139145

140146
- use`DouyinAppV1`of`fetch_one_video`The method calls the interface to obtain single video data.
@@ -148,6 +154,21 @@ print(video_data)
148154
- We have used HTTPX to asynchronously encapsulate most endpoints. If your code is executed synchronously, you can use the following code to prevent asynchronous infection.
149155

150156
```python
157+
# 导入异步io库 | Import asyncio
158+
import asyncio
159+
160+
# 导入tikhub | Import tikhub
161+
from tikhub import Client
162+
163+
# 初始化Client | Initialize Client
164+
client = Client(base_url="https://api.tikhub.io",
165+
api_key="YOUR_API_TOKEN",
166+
proxies=None,
167+
max_retries=3,
168+
max_connections=50,
169+
timeout=60,
170+
max_tasks=50)
171+
151172
# 获取抖音单一视频数据 | Get a single video data from Douyin
152173
def fetch_one_video(aweme_id: str):
153174
# 创建一个异步事件循环

0 commit comments

Comments
 (0)