Skip to content

Commit c73e62b

Browse files
committed
Upgraded SDK V1.12.1 Add Support V5.2.0 API
1 parent cf9ffa7 commit c73e62b

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

dist/tikhub-1.12.1-py3-none-any.whl

67.2 KB
Binary file not shown.

dist/tikhub-1.12.1.tar.gz

45.6 KB
Binary file not shown.

tikhub/api/v1/endpoints/tiktok/web/tiktok_web.py

+12
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,18 @@ async def tiktok_live_room_ws(self, live_room_url: str, danmaku_type: str):
210210
except Exception as e:
211211
print(f"Failed to connect: {e}")
212212

213+
# 直播间开播状态检测 | Live room broadcast status detection
214+
async def fetch_check_live_alive(self, room_id: str):
215+
endpoint = "/api/v1/tiktok/web/fetch_check_live_alive"
216+
data = await self.client.fetch_get_json(f"{endpoint}?room_id={room_id}")
217+
return data
218+
219+
# 通过直播链接获取直播间信息(离线直播间也可以获取) | Get live room information through live link (offline live room can also be obtained)
220+
async def fetch_tiktok_live_data(self, live_room_url: str):
221+
endpoint = "/api/v1/tiktok/web/fetch_tiktok_live_data"
222+
data = await self.client.fetch_get_json(f"{endpoint}?live_room_url={live_room_url}")
223+
return data
224+
213225

214226
if __name__ == "__main__":
215227
import asyncio

tikhub/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# tikhub/version.py
2-
version = "1.12.0"
2+
version = "1.12.1"

0 commit comments

Comments
 (0)