1
- # tkhub_pp( [ API.TikHub.io ] ( https://api.tikhub.io/docs ) )
1
+ < div align = " center " >
2
2
3
- [ API.TikHub.io] ( https://api.tikhub.io/docs ) , is an asynchronous high-performance Douyin and TikTok data crawling tool. This Repo is a PyPi package based on this API, which is convenient for developers to call.
3
+ # [ tikhub_pp] ( https://pypi.org/project/tikhub )
4
+
5
+ 「[ api.tikhub.io] ( https://api.tikhub.io/docs ) ", is an asynchronous high-performance Douyin and TikTok data crawling online tool. This repo is a package based on this API, which is convenient for developers to call.
6
+
7
+ Pee:< https://pypi.org/project/tikhub >
8
+
9
+ [ English] ( ./README.en.md ) \| [ Simplified Chinese] ( ./README.md )
10
+
11
+ </div >
4
12
5
13
## note
6
14
7
15
> This project uses the following Emoji to indicate the development status in the development chart!
8
16
9
- | Emoji | representative meaning |
10
- | :---: | :-----------------------------------------------------------------------------------------------------------------: |
11
- | 🚀 | Rocket - The feature is written, tested, and deployed to production. |
12
- | ✅ | Checkmark - The feature is written but has yet to be tested and will be deployed to production once the tests pass. |
13
- | ❌ | Cross sign - The feature has not yet been written or has not been written yet. |
14
- | 🔜 | SOON BREAK - Feature proposed but not yet assigned a designated developer. |
15
- | ⚠️ | Warning symbol - There is a problem with the function that needs to be fixed. |
17
+ | Emoji | representative meaning |
18
+ | :---: | :------------------------------------------------------------------------------------------------------------------- : |
19
+ | 🚀 | Rocket - The feature is written, tested, and deployed to production. |
20
+ | ✅ | Check mark - the feature is written, but has yet to be tested and will be deployed to production once the tests pass. |
21
+ | ❌ | Cross sign - Feature has not yet been written or has not been written yet. |
22
+ | 🔜 | SOON符 - 功能已提出但尚未分配指定开发人员。 |
23
+ | ⚠️ | Warning symbol - There is a problem with the function that needs to be fixed. |
16
24
17
25
## project progress
18
26
41
49
| 🚀 | ` /douyin_profile_videos/ ` | Crawl user homepage video data | no known issues |
42
50
| 🚀 | ` /douyin_profile_liked_videos/ ` | Crawl the user homepage has liked the video data | no known issues |
43
51
44
- > Production deployment of TikTok-related interfaces - API tags: TikTok
52
+ > Production and deployment of TikTok-related interfaces - API tags: TikTok
45
53
46
54
| state | API endpoint path | Function | issue |
47
55
| :---: | :-----------------------------: | :----------------------------------------------: | :-------------: |
48
- | 🚀 | ` /tiktok_video_data/ ` | Crawl a single video data | no known issues |
56
+ | 🚀 | ` /tiktok_video_data/ ` | Crawl a single video data | 无已知问题 |
49
57
| 🚀 | ` /tiktok_video_comments/ ` | Crawl a single video comment data | no known issues |
50
58
| 🚀 | ` /tiktok_music_videos/ ` | Crawl the soundtrack data | no known issues |
51
59
| 🚀 | ` /tiktok_profile_videos/ ` | Crawl user homepage video data | no known issues |
58
66
59
67
## Example of use
60
68
69
+ > Check[ demo.py] ( https://github.com/TikHubIO/TikHub_PyPi/blob/main/demo/demo.py )
70
+
61
71
``` python
72
+ import asyncio
73
+ import time
74
+
75
+ from tikhub.api import API
76
+
62
77
async def async_test () -> None :
63
78
# 异步测试/Async test
64
79
@@ -68,7 +83,7 @@ async def async_test() -> None:
68
83
69
84
douyin_url = ' https://www.douyin.com/video/7153585499477757192'
70
85
71
- douyin_user_url = ' https://www.douyin.com/user/MS4wLjABAAAA-Hu1YKTuhE3QkCHD5yU26k--RUZiaoMRtpfmeid-Z_o '
86
+ douyin_user_url = ' https://www.douyin.com/user/MS4wLjABAAAAaNJuvXC83kL5nhaZHubKdjsRJQovgz58wXzlLnJUsslG-Kb24TM1QJlf_2HMaUJk '
72
87
73
88
print (" Test start...\n " )
74
89
start_time = time.time()
@@ -121,6 +136,7 @@ async def async_test() -> None:
121
136
# 获取用户主页的所有点赞视频数据/Get all liked video data on the user's homepage
122
137
print (" Running test : API.get_douyin_profile_liked_videos()" )
123
138
aweme_list = await api.get_douyin_profile_liked_videos(douyin_user_url, 20 )
139
+ print (f ' Get { len (aweme_list)} liked videos from profile ' )
124
140
125
141
# 总耗时/Total time
126
142
total_time = round (time.time() - start_time, 2 )
0 commit comments