@@ -11,7 +11,7 @@ def __init__(self, client: APIClient):
11
11
12
12
# 获取单个作品数据 | Get single video data
13
13
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"
15
15
data = await self .client .fetch_get_json (f"{ endpoint } ?aweme_id={ aweme_id } " )
16
16
return data
17
17
@@ -23,91 +23,91 @@ async def fetch_one_video_by_share_url(self, share_url: str):
23
23
24
24
# 获取指定用户的信息 | Get information of specified user
25
25
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"
27
27
data = await self .client .fetch_get_json (f"{ endpoint } ?sec_user_id={ sec_user_id } " )
28
28
return data
29
29
30
30
# 获取用户主页作品数据 | Get user homepage video data
31
31
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"
33
33
data = await self .client .fetch_get_json (
34
34
f"{ endpoint } ?sec_user_id={ sec_user_id } &max_cursor={ max_cursor } &count={ count } " )
35
35
return data
36
36
37
37
# 获取用户喜欢作品数据 | Get user like video data
38
38
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"
40
40
data = await self .client .fetch_get_json (
41
41
f"{ endpoint } ?sec_user_id={ sec_user_id } &max_cursor={ max_cursor } &counts={ counts } " )
42
42
return data
43
43
44
44
# 获取单个视频评论数据 | Get single video comments data
45
45
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"
47
47
data = await self .client .fetch_get_json (f"{ endpoint } ?aweme_id={ aweme_id } &cursor={ cursor } &count={ count } " )
48
48
return data
49
49
50
50
# 获取指定视频的评论回复数据 | Get comment replies data of specified video
51
51
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"
53
53
data = await self .client .fetch_get_json (
54
54
f"{ endpoint } ?item_id={ item_id } &comment_id={ comment_id } &cursor={ cursor } &count={ count } " )
55
55
return data
56
56
57
57
# 获取指定关键词的综合搜索结果 | Get comprehensive search results of specified keywords
58
58
async def fetch_general_search_result (self , keyword : str , offset : int , count : int , sort_type : int ,
59
59
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"
61
61
data = await self .client .fetch_get_json (
62
62
f"{ endpoint } ?keyword={ keyword } &offset={ offset } &count={ count } &sort_type={ sort_type } &publish_time={ publish_time } " )
63
63
return data
64
64
65
65
# 获取指定关键词的视频搜索结果 | Get video search results of specified keywords
66
66
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"
68
68
data = await self .client .fetch_get_json (
69
69
f"{ endpoint } ?keyword={ keyword } &offset={ offset } &count={ count } &sort_type={ sort_type } &publish_time={ publish_time } " )
70
70
return data
71
71
72
72
# 获取指定关键词的用户搜索结果 | Get user search results of specified keywords
73
73
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"
75
75
data = await self .client .fetch_get_json (f"{ endpoint } ?keyword={ keyword } &offset={ offset } &count={ count } " )
76
76
return data
77
77
78
78
# 获取指定关键词的音乐搜索结果 | Get music search results of specified keywords
79
79
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"
81
81
data = await self .client .fetch_get_json (f"{ endpoint } ?keyword={ keyword } &offset={ offset } &count={ count } " )
82
82
return data
83
83
84
84
# 获取指定关键词的话题搜索结果 | Get hashtag search results of specified keywords
85
85
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"
87
87
data = await self .client .fetch_get_json (f"{ endpoint } ?keyword={ keyword } &offset={ offset } &count={ count } " )
88
88
return data
89
89
90
90
# 获取指定音乐的详情数据 | Get details of specified music
91
91
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"
93
93
data = await self .client .fetch_get_json (f"{ endpoint } ?music_id={ music_id } " )
94
94
return data
95
95
96
96
# 获取指定音乐的视频列表数据 | Get video list of specified music
97
97
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"
99
99
data = await self .client .fetch_get_json (f"{ endpoint } ?music_id={ music_id } &cursor={ cursor } &count={ count } " )
100
100
return data
101
101
102
102
# 获取指定话题的详情数据 | Get details of specified hashtag
103
103
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"
105
105
data = await self .client .fetch_get_json (f"{ endpoint } ?ch_id={ ch_id } " )
106
106
return data
107
107
108
108
# 获取指定话题的作品数据 | Get video list of specified hashtag
109
109
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"
111
111
data = await self .client .fetch_get_json (
112
112
f"{ endpoint } ?ch_id={ ch_id } &cursor={ cursor } &count={ count } &sort_type={ sort_type } " )
113
113
return data
@@ -138,7 +138,7 @@ async def fetch_hot_brand_search_category(self):
138
138
139
139
# 获取抖音品牌热榜具体分类数据 | Get Douyin brand hot search list detail data
140
140
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"
142
142
data = await self .client .fetch_get_json (f"{ endpoint } ?category_id={ category_id } " )
143
143
return data
144
144
0 commit comments