Skip to content

Commit 7073d8b

Browse files
committed
Upgraded SDK V1.10.4 support Upstream API V5.0.2
1 parent bd5f9b5 commit 7073d8b

File tree

8 files changed

+37
-1
lines changed

8 files changed

+37
-1
lines changed
53.9 KB
Binary file not shown.

dist/tikhub-1.10.4.tar.gz

35.9 KB
Binary file not shown.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name="tikhub",
16-
version="1.10.3",
16+
version="1.10.4",
1717
author="TikHub.io",
1818
author_email="tikhub.io@proton.me",
1919
description="A Python SDK for TikHub RESTful API",

tikhub/api/v1/endpoints/douyin/app/douyin_app_v1.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ async def fetch_one_video(self, aweme_id: str):
1515
data = await self.client.fetch_get_json(f"{endpoint}?aweme_id={aweme_id}")
1616
return data
1717

18+
# 根据分享链接获取作品数据 | Get video data by sharing url
19+
async def fetch_one_video_by_share_url(self, share_url: str):
20+
endpoint = "/api/v1/douyin/app/v1/fetch_one_video_by_share_url"
21+
data = await self.client.fetch_get_json(f"{endpoint}?share_url={share_url}")
22+
return data
23+
1824
# 获取指定用户的信息 | Get information of specified user
1925
async def handler_user_profile(self, sec_user_id: str):
2026
endpoint = f"/api/v1/douyin/app/v1/handler_user_profile?sec_user_id={sec_user_id}"

tikhub/api/v1/endpoints/douyin/app/douyin_app_v2.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ async def fetch_one_video(self, aweme_id: str):
1818
data = await self.client.fetch_get_json(f"{endpoint}?aweme_id={aweme_id}")
1919
return data
2020

21+
# 根据分享链接获取作品数据 | Get video data by sharing url
22+
async def fetch_one_video_by_share_url(self, share_url: str):
23+
endpoint = "/api/v1/douyin/app/v2/fetch_one_video_by_share_url"
24+
data = await self.client.fetch_get_json(f"{endpoint}?share_url={share_url}")
25+
return data
26+
2127
# 获取指定用户的信息 | Get information of specified user
2228
async def handler_user_profile(self, sec_user_id: str):
2329
endpoint = f"/api/v1/douyin/app/v2/handler_user_profile"

tikhub/api/v1/endpoints/douyin/app/douyin_app_v3.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ async def fetch_one_video(self, aweme_id: str):
1818
data = await self.client.fetch_get_json(f"{endpoint}?aweme_id={aweme_id}")
1919
return data
2020

21+
# 根据分享链接获取作品数据 | Get video data by sharing url
22+
async def fetch_one_video_by_share_url(self, share_url: str):
23+
endpoint = "/api/v1/douyin/app/v3/fetch_one_video_by_share_url"
24+
data = await self.client.fetch_get_json(f"{endpoint}?share_url={share_url}")
25+
return data
26+
2127
# 获取指定用户的信息
2228
async def handler_user_profile(self, sec_user_id: str):
2329
endpoint = f"/api/v1/douyin/app/v3/handler_user_profile"

tikhub/api/v1/endpoints/tiktok/app/tiktok_app_v2.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ async def fetch_one_video(self, aweme_id: int):
1616
data = await self.client.fetch_get_json(f"{endpoint}?aweme_id={aweme_id}")
1717
return data
1818

19+
# 根据分享链接获取作品数据 | Get video data by sharing url
20+
async def fetch_one_video_by_share_url(self, share_url: str):
21+
endpoint = "/api/v1/tiktok/app/v2/fetch_one_video_by_share_url"
22+
data = await self.client.fetch_get_json(f"{endpoint}?share_url={share_url}")
23+
return data
24+
1925
# 获取指定用户的信息 | Get information of specified user
2026
async def handler_user_profile(self, sec_user_id: str):
2127
endpoint = "/api/v1/tiktok/app/v2/handler_user_profile"

tikhub/api/v1/endpoints/tiktok/app/tiktok_app_v3.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,24 @@ async def fetch_one_video(self, aweme_id: int):
1616
data = await self.client.fetch_get_json(f"{endpoint}?aweme_id={aweme_id}")
1717
return data
1818

19+
# 根据分享链接获取作品数据 | Get video data by sharing url
20+
async def fetch_one_video_by_share_url(self, share_url: str):
21+
endpoint = "/api/v1/tiktok/app/v3/fetch_one_video_by_share_url"
22+
data = await self.client.fetch_get_json(f"{endpoint}?share_url={share_url}")
23+
return data
24+
1925
# 获取指定用户的信息 | Get information of specified user
2026
async def handler_user_profile(self, sec_user_id: str):
2127
endpoint = "/api/v1/tiktok/app/v3/handler_user_profile"
2228
data = await self.client.fetch_get_json(f"{endpoint}?sec_user_id={sec_user_id}")
2329
return data
2430

31+
# 获取用户转发的作品数据 | Get user repost video data
32+
async def fetch_user_repost_videos(self, user_id: int, offset: int, count: int):
33+
endpoint = "/api/v1/tiktok/app/v3/fetch_user_repost_videos"
34+
data = await self.client.fetch_get_json(f"{endpoint}?user_id={user_id}&offset={offset}&count={count}")
35+
return data
36+
2537
# 获取用户主页作品数据 | Get user homepage video data
2638
async def fetch_user_post_videos(self, sec_user_id: str, max_cursor: int, count: int):
2739
endpoint = "/api/v1/tiktok/app/v3/fetch_user_post_videos"

0 commit comments

Comments
 (0)