File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -48,24 +48,33 @@ Import
48
48
```
49
49
from TikTokAPI import TikTokAPI
50
50
```
51
+ Get your keys from Cookie. You can get them from the Applications tab in Chrome developer console.
52
+ By default it used hardcoded values which may not work after some time.
53
+ The keys to extract are ` s_v_web_id ` and ` tt_webid `
54
+ ```
55
+ cookie = {
56
+ "s_v_web_id": "<your_key>",
57
+ "tt_webid": "<your_key>"
58
+ }
59
+ ```
51
60
Get the most trending Videos on TikTok
52
61
```
53
- api = TikTokAPI()
62
+ api = TikTokAPI(cookie=cookie )
54
63
retval = api.getTrending(count=5)
55
64
```
56
65
Get a user by name
57
66
```
58
- api = TikTokAPI()
67
+ api = TikTokAPI(cookie=cookie )
59
68
user_obj = api.getUserByName("fcbarcelona")
60
69
```
61
70
Get videos of a user
62
71
```
63
- api = TikTokAPI()
72
+ api = TikTokAPI(cookie=cookie )
64
73
user_videos = api.getVideosByUserName("fcbarcelona")
65
74
```
66
75
Get likes of a user
67
76
```
68
- api = TikTokAPI()
77
+ api = TikTokAPI(cookie=cookie )
69
78
user_videos = api.getLikesByUserName("fcbarcelona")
70
79
```
71
80
Original file line number Diff line number Diff line change 6
6
setuptools .setup (
7
7
name = "PyTikTokAPI" ,
8
8
packages = setuptools .find_packages (),
9
- version = "0.0.4 " ,
9
+ version = "0.0.5 " ,
10
10
license = 'MIT' ,
11
11
author = "Avilash Kumar" ,
12
12
author_email = "avilashkumar4@gmail.com" ,
You can’t perform that action at this time.
0 commit comments