Skip to content

Commit 86ab7ca

Browse files
committed
Version upgrade and Readme upgrade
1 parent 8d6d805 commit 86ab7ca

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,33 @@ Import
4848
```
4949
from TikTokAPI import TikTokAPI
5050
```
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+
```
5160
Get the most trending Videos on TikTok
5261
```
53-
api = TikTokAPI()
62+
api = TikTokAPI(cookie=cookie)
5463
retval = api.getTrending(count=5)
5564
```
5665
Get a user by name
5766
```
58-
api = TikTokAPI()
67+
api = TikTokAPI(cookie=cookie)
5968
user_obj = api.getUserByName("fcbarcelona")
6069
```
6170
Get videos of a user
6271
```
63-
api = TikTokAPI()
72+
api = TikTokAPI(cookie=cookie)
6473
user_videos = api.getVideosByUserName("fcbarcelona")
6574
```
6675
Get likes of a user
6776
```
68-
api = TikTokAPI()
77+
api = TikTokAPI(cookie=cookie)
6978
user_videos = api.getLikesByUserName("fcbarcelona")
7079
```
7180

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setuptools.setup(
77
name="PyTikTokAPI",
88
packages=setuptools.find_packages(),
9-
version="0.0.4",
9+
version="0.0.5",
1010
license='MIT',
1111
author="Avilash Kumar",
1212
author_email="avilashkumar4@gmail.com",

0 commit comments

Comments
 (0)