Skip to content

Commit 6df638f

Browse files
committed
Upgraded SDK V1.10.7 Fix douyin_app_v1.py bugs.
1 parent a5907db commit 6df638f

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

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

54.8 KB
Binary file not shown.

dist/tikhub-1.10.7.tar.gz

36.2 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.6",
16+
version="1.10.7",
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: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def __init__(self, client: APIClient):
1111

1212
# 获取单个作品数据 | Get single video data
1313
async def fetch_one_video(self, aweme_id: str):
14-
endpoint = f"/api/v1/douyin/app/v1/fetch_one_video?aweme_id={aweme_id}"
14+
endpoint = "/api/v1/douyin/app/v1/fetch_one_video"
1515
data = await self.client.fetch_get_json(f"{endpoint}?aweme_id={aweme_id}")
1616
return data
1717

@@ -23,91 +23,91 @@ async def fetch_one_video_by_share_url(self, share_url: str):
2323

2424
# 获取指定用户的信息 | Get information of specified user
2525
async def handler_user_profile(self, sec_user_id: str):
26-
endpoint = f"/api/v1/douyin/app/v1/handler_user_profile?sec_user_id={sec_user_id}"
26+
endpoint = f"/api/v1/douyin/app/v1/handler_user_profile"
2727
data = await self.client.fetch_get_json(f"{endpoint}?sec_user_id={sec_user_id}")
2828
return data
2929

3030
# 获取用户主页作品数据 | Get user homepage video data
3131
async def fetch_user_post_videos(self, sec_user_id: str, max_cursor: int, count: int):
32-
endpoint = f"/api/v1/douyin/app/v1/fetch_user_post_videos?sec_user_id={sec_user_id}&max_cursor={max_cursor}&count={count}"
32+
endpoint = f"/api/v1/douyin/app/v1/fetch_user_post_videos"
3333
data = await self.client.fetch_get_json(
3434
f"{endpoint}?sec_user_id={sec_user_id}&max_cursor={max_cursor}&count={count}")
3535
return data
3636

3737
# 获取用户喜欢作品数据 | Get user like video data
3838
async def fetch_user_like_videos(self, sec_user_id: str, max_cursor: int, counts: int):
39-
endpoint = f"/api/v1/douyin/app/v1/fetch_user_like_videos?sec_user_id={sec_user_id}&max_cursor={max_cursor}&counts={counts}"
39+
endpoint = f"/api/v1/douyin/app/v1/fetch_user_like_videos"
4040
data = await self.client.fetch_get_json(
4141
f"{endpoint}?sec_user_id={sec_user_id}&max_cursor={max_cursor}&counts={counts}")
4242
return data
4343

4444
# 获取单个视频评论数据 | Get single video comments data
4545
async def fetch_video_comments(self, aweme_id: str, cursor: int, count: int):
46-
endpoint = f"/api/v1/douyin/app/v1/fetch_video_comments?aweme_id={aweme_id}&cursor={cursor}&count={count}"
46+
endpoint = f"/api/v1/douyin/app/v1/fetch_video_comments"
4747
data = await self.client.fetch_get_json(f"{endpoint}?aweme_id={aweme_id}&cursor={cursor}&count={count}")
4848
return data
4949

5050
# 获取指定视频的评论回复数据 | Get comment replies data of specified video
5151
async def fetch_video_comments_reply(self, item_id: str, comment_id: str, cursor: int, count: int):
52-
endpoint = f"/api/v1/douyin/app/v1/fetch_video_comment_replies?item_id={item_id}&comment_id={comment_id}&cursor={cursor}&count={count}"
52+
endpoint = f"/api/v1/douyin/app/v1/fetch_video_comment_replies"
5353
data = await self.client.fetch_get_json(
5454
f"{endpoint}?item_id={item_id}&comment_id={comment_id}&cursor={cursor}&count={count}")
5555
return data
5656

5757
# 获取指定关键词的综合搜索结果 | Get comprehensive search results of specified keywords
5858
async def fetch_general_search_result(self, keyword: str, offset: int, count: int, sort_type: int,
5959
publish_time: int):
60-
endpoint = f"/api/v1/douyin/app/v1/fetch_general_search_result?keyword={keyword}&offset={offset}&count={count}&sort_type={sort_type}&publish_time={publish_time}"
60+
endpoint = f"/api/v1/douyin/app/v1/fetch_general_search_result"
6161
data = await self.client.fetch_get_json(
6262
f"{endpoint}?keyword={keyword}&offset={offset}&count={count}&sort_type={sort_type}&publish_time={publish_time}")
6363
return data
6464

6565
# 获取指定关键词的视频搜索结果 | Get video search results of specified keywords
6666
async def fetch_video_search_result(self, keyword: str, offset: int, count: int, sort_type: int, publish_time: int):
67-
endpoint = f"/api/v1/douyin/app/v1/fetch_video_search_result?keyword={keyword}&offset={offset}&count={count}&sort_type={sort_type}&publish_time={publish_time}"
67+
endpoint = f"/api/v1/douyin/app/v1/fetch_video_search_result"
6868
data = await self.client.fetch_get_json(
6969
f"{endpoint}?keyword={keyword}&offset={offset}&count={count}&sort_type={sort_type}&publish_time={publish_time}")
7070
return data
7171

7272
# 获取指定关键词的用户搜索结果 | Get user search results of specified keywords
7373
async def fetch_user_search_result(self, keyword: str, offset: int, count: int):
74-
endpoint = f"/api/v1/douyin/app/v1/fetch_user_search_result?keyword={keyword}&offset={offset}&count={count}"
74+
endpoint = f"/api/v1/douyin/app/v1/fetch_user_search_result"
7575
data = await self.client.fetch_get_json(f"{endpoint}?keyword={keyword}&offset={offset}&count={count}")
7676
return data
7777

7878
# 获取指定关键词的音乐搜索结果 | Get music search results of specified keywords
7979
async def fetch_music_search_result(self, keyword: str, offset: int, count: int):
80-
endpoint = f"/api/v1/douyin/app/v1/fetch_music_search_result?keyword={keyword}&offset={offset}&count={count}"
80+
endpoint = f"/api/v1/douyin/app/v1/fetch_music_search_result"
8181
data = await self.client.fetch_get_json(f"{endpoint}?keyword={keyword}&offset={offset}&count={count}")
8282
return data
8383

8484
# 获取指定关键词的话题搜索结果 | Get hashtag search results of specified keywords
8585
async def fetch_hashtag_search_result(self, keyword: str, offset: int, count: int):
86-
endpoint = f"/api/v1/douyin/app/v1/fetch_hashtag_search_result?keyword={keyword}&offset={offset}&count={count}"
86+
endpoint = f"/api/v1/douyin/app/v1/fetch_hashtag_search_result"
8787
data = await self.client.fetch_get_json(f"{endpoint}?keyword={keyword}&offset={offset}&count={count}")
8888
return data
8989

9090
# 获取指定音乐的详情数据 | Get details of specified music
9191
async def fetch_music_detail(self, music_id: str):
92-
endpoint = f"/api/v1/douyin/app/v1/fetch_music_detail?music_id={music_id}"
92+
endpoint = f"/api/v1/douyin/app/v1/fetch_music_detail"
9393
data = await self.client.fetch_get_json(f"{endpoint}?music_id={music_id}")
9494
return data
9595

9696
# 获取指定音乐的视频列表数据 | Get video list of specified music
9797
async def fetch_music_video_list(self, music_id: str, cursor: int, count: int):
98-
endpoint = f"/api/v1/douyin/app/v1/fetch_music_video_list?music_id={music_id}&cursor={cursor}&count={count}"
98+
endpoint = f"/api/v1/douyin/app/v1/fetch_music_video_list"
9999
data = await self.client.fetch_get_json(f"{endpoint}?music_id={music_id}&cursor={cursor}&count={count}")
100100
return data
101101

102102
# 获取指定话题的详情数据 | Get details of specified hashtag
103103
async def fetch_hashtag_detail(self, ch_id: int):
104-
endpoint = f"/api/v1/douyin/app/v1/fetch_hashtag_detail?ch_id={ch_id}"
104+
endpoint = f"/api/v1/douyin/app/v1/fetch_hashtag_detail"
105105
data = await self.client.fetch_get_json(f"{endpoint}?ch_id={ch_id}")
106106
return data
107107

108108
# 获取指定话题的作品数据 | Get video list of specified hashtag
109109
async def fetch_hashtag_post_list(self, ch_id: int, cursor: int, count: int, sort_type: int):
110-
endpoint = f"/api/v1/douyin/app/v1/fetch_hashtag_video_list?ch_id={ch_id}&cursor={cursor}&count={count}&sort_type={sort_type}"
110+
endpoint = f"/api/v1/douyin/app/v1/fetch_hashtag_video_list"
111111
data = await self.client.fetch_get_json(
112112
f"{endpoint}?ch_id={ch_id}&cursor={cursor}&count={count}&sort_type={sort_type}")
113113
return data
@@ -138,7 +138,7 @@ async def fetch_hot_brand_search_category(self):
138138

139139
# 获取抖音品牌热榜具体分类数据 | Get Douyin brand hot search list detail data
140140
async def fetch_hot_brand_search(self, category_id: int):
141-
endpoint = f"/api/v1/douyin/app/v1/fetch_brand_hot_search_list_detail?category_id={category_id}"
141+
endpoint = f"/api/v1/douyin/app/v1/fetch_brand_hot_search_list_detail"
142142
data = await self.client.fetch_get_json(f"{endpoint}?category_id={category_id}")
143143
return data
144144

0 commit comments

Comments
 (0)