You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While Tik Tok is pretty good about blocking bots (giving "too many requests" with FireFox's default installation"), simply copying your session tokens is enough to bypass this restriction and be able to upload your videos.
7
10
11
+
```bash
12
+
$ tiktok_uploader -v video.mp4 -d "this is my description" -c cookies.txt
13
+
```
14
+
15
+
```python
16
+
upload_video('video.mp4', description='this is my description', cookies='cookies.txt') # single video
17
+
18
+
# Multiple Videos
19
+
videos = [
20
+
{'path': 'video.mp4', 'description': 'this is my description'},
21
+
{'path': 'video2.mp4', 'description': 'this is also my description'}
22
+
]
23
+
auth = AuthBackend(cookies='cookies.txt')
24
+
upload_videos(videos=videos, auth=auth)
25
+
```
8
26
### Uploading videos
9
27
10
28
This library revolves around the 'upload_video' function which takes in a list of videos which have **filenames** and **descriptions** and are passed as follows:
@@ -33,7 +51,9 @@ Finally, pass the saved file path to `upload_videos`.
33
51
upload_videos(cookies='cookies.txt')
34
52
```
35
53
36
-
> Optionally, if you would like to pass your own cookies you may do as an array of dictionaries with keys `name`, `value`, `domain`, `path` and `expiry` though there really is no need
54
+
> Optionally, if you would like to pass your own cookies you may do as an array of dictionaries with keys `name`, `value`, `domain`, `path` and `expiry`
55
+
56
+
> The login script does have a `login_accounts` function, but this gets detected by the
> As a side note, try to avoid keeping passwords as values in your code. You can read more about why [here](https://medium.com/twodigits/keep-passwords-out-of-source-code-why-and-how-e84f9004815a).
@@ -68,10 +86,16 @@ options = Options()
68
86
69
87
options.add_argument('start-maximized')
70
88
71
-
upload_videos(browser_agent=options)
89
+
upload_videos(options=options)
72
90
```
73
91
74
-
> Note: Options are Browser specific
92
+
> Note: Make sure to use the right selenium options for your browser
93
+
94
+
### Headless Browsers
95
+
96
+
**Headless browsers do not work at this time**
97
+
98
+
> If more experienced in Webscraping, I would really appreciate helping make this work. [undetected-chromedriver](https://github.com/ultrafunkamsterdam/undetected-chromedriver) was already tried and did not work
description = "An automatic TikTok video uploader w/ CLI"
7
+
description = "An automatic TikTok video uploader w/ CLI. Uses cookies from your browser to manage authentication and upload your videos automatically."
0 commit comments