tiktokautouploader 2.91__tar.gz → 2.93__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tiktokautouploader-2.91/DOCUMENTATION.md → tiktokautouploader-2.93/Documentation.md +18 -11
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/PKG-INFO +15 -15
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/README.md +14 -14
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/pyproject.toml +2 -2
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/tiktokautouploader/function.py +44 -125
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/.gitignore +0 -0
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/LICENSE.md +0 -0
- /tiktokautouploader-2.91/READMEimage/Captcha2.gif → /tiktokautouploader-2.93/READMEimage/2ndCaptcha.gif +0 -0
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/READMEimage/Captcha1.gif +0 -0
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/READMEimage/READMEimg.png +0 -0
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/tiktokautouploader/Js_assets/login.js +0 -0
- {tiktokautouploader-2.91 → tiktokautouploader-2.93}/tiktokautouploader/__init__.py +0 -0
@@ -7,7 +7,7 @@ This document provides detailed information about the parameters and usage of th
|
|
7
7
|
- **Parameter Explanations**: Provides detailed descriptions of each parameter, including the valid options and their effects.
|
8
8
|
- **Initialization Info**: Details instances that occur during first run of function
|
9
9
|
- **Important Notes**: Highlights important account recommendations and limitations related to TikTok accounts and scheduling.
|
10
|
-
- **Supported Captchas**: Showcases the
|
10
|
+
- **Supported Captchas**: Showcases the Captchas the code is able to solve
|
11
11
|
- **Runtime**: Provides an estimate of how much runtime is added by different parameters
|
12
12
|
- **Example Usage**: Demonstrates a practical example of how to use the function.
|
13
13
|
|
@@ -38,7 +38,7 @@ This document provides detailed information about the parameters and usage of th
|
|
38
38
|
- **`schedule`** (str, optional, default: None)
|
39
39
|
- The time you want the video to be uploaded. The format should be `HH:MM`, and the minute (`MM`) must be a multiple of 5. The scheduled time must be at least 15 minutes later than the current local time (unless scheduling for a different day). The time should be in your local time zone.
|
40
40
|
|
41
|
-
- **`day`** (int, optional, default: None) (requires
|
41
|
+
- **`day`** (int, optional, default: None) (requires `schedule` != None)
|
42
42
|
- If you want to schedule the video for a different day, this parameter specifies the day of the current month on which to upload the video. i.e: If current day is Sept 3rd, day=5 will upload video on Sept 5th
|
43
43
|
- NOTE: You will also need to specify time of upload in `schedule` parameter or else `day` won't work
|
44
44
|
|
@@ -47,13 +47,13 @@ This document provides detailed information about the parameters and usage of th
|
|
47
47
|
- If scheduling for the next month, you can only schedule within the first 5 days of the next month (as long as they are also within 10 days of the current date). i.e: If current day is Sept 30th, day=5 will upload on Oct 5th, 6 WILL NOT WORK.
|
48
48
|
|
49
49
|
- **`copyrightcheck`** (bool, optional, default: `False`)
|
50
|
-
- If set to `True`, the function will conduct a copyright check on TikTok before uploading. If the check fails, the
|
50
|
+
- If set to `True`, the function will conduct a copyright check on TikTok before uploading. If the check fails, the code execution will stop.
|
51
51
|
|
52
|
-
- **`suppressprint`** (bool, optional, default: `
|
52
|
+
- **`suppressprint`** (bool, optional, default: `False`)
|
53
53
|
- Suppresses print messages that indicate the progress of the video upload. It is recommended to set this to `False` when first running the code to see progress and ensure everything works correctly.
|
54
54
|
|
55
55
|
|
56
|
-
|
56
|
+
## 🛠️ Initialization Info
|
57
57
|
|
58
58
|
- **During FIRST RUN:**
|
59
59
|
|
@@ -64,11 +64,11 @@ This document provides detailed information about the parameters and usage of th
|
|
64
64
|
- Runtime might be a 20-30 seconds longer than usual, this is due to libraries being built. Runtime should return to normal after first run
|
65
65
|
|
66
66
|
|
67
|
-
|
67
|
+
## 📝 Important Notes
|
68
68
|
|
69
69
|
- **VERY IMPORTANT: TikTok Account Recommendations**:
|
70
70
|
- It is recommended to have a TikTok account with at least a few weeks of history built up for the best results.
|
71
|
-
- If you want to upload your video with TikTok sounds, your TikTok account MUST have the ability to save drafts; otherwise, you can just upload/schedule the video with copyright checks and trending hashtags
|
71
|
+
- If you want to upload your video with TikTok sounds, your TikTok account MUST have the ability to save drafts; otherwise, you can just upload/schedule the video with copyright checks and trending hashtags.
|
72
72
|
|
73
73
|
- **Scheduling Limitations**:
|
74
74
|
- The function allows scheduling up to 10 days in advance.
|
@@ -76,15 +76,22 @@ This document provides detailed information about the parameters and usage of th
|
|
76
76
|
|
77
77
|
## ⛔ Supported Captchas:
|
78
78
|
|
79
|
-
|
79
|
+
### Captcha solver currently supports Captchas of type:
|
80
80
|
<p align="center">
|
81
|
-
<img src="READMEimage/Captcha1.gif" alt="" width="
|
81
|
+
<img src="READMEimage/Captcha1.gif" alt="" width="250" loop=infinite/>
|
82
82
|
</p>
|
83
83
|
|
84
84
|
<p align="center">
|
85
|
-
<img src="READMEimage/
|
85
|
+
<img src="READMEimage/2ndCaptcha.gif" alt="" width="250" loop=infinite/>
|
86
86
|
</p>
|
87
87
|
|
88
|
+
#### Note:
|
89
|
+
- These GIFs are just to showcase the project's ability to auto-solve captcha's, this entire process will take place 'under the hood', you will not see the captcha being solved.
|
90
|
+
|
91
|
+
- As far as I'm aware these captchas are the only types of captchas that you may encounter when trying to upload TikTok's, if you do encounter a different captcha, I highly encourage you to email me and let me know and I will try to increase the capabilities of this project to include those captcha's as well.
|
92
|
+
|
93
|
+
- To check what captcha shows up when you upload on your account just open this link while logged in to TikTok: https://www.tiktok.com/tiktokstudio/upload?from=upload&lang=en
|
94
|
+
|
88
95
|
## 🕰️ Runtime:
|
89
96
|
**Total runtime depends on how long TikTok takes to upload your video to their servers, however, here are approximations on how much runtime is added by each parameter**
|
90
97
|
|
@@ -116,4 +123,4 @@ upload_tiktok(
|
|
116
123
|
)
|
117
124
|
```
|
118
125
|
|
119
|
-
For more details or if errors persist, please feel free to contact me at haziqmk123@gmail.com or on LinkedIn (on my github profile)
|
126
|
+
For more details or if errors persist, please feel free to contact me at haziqmk123@gmail.com or on LinkedIn (on my github profile)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: tiktokautouploader
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.93
|
4
4
|
Summary: Upload or schedule videos to TikTok with viral TikTok sounds and hashtags.
|
5
5
|
Project-URL: Homepage, https://github.com/haziq-exe/TikTokAutoUploader
|
6
6
|
Author-email: HAZIQ <haziqmk123@gmail.com>
|
@@ -31,13 +31,13 @@ Description-Content-Type: text/markdown
|
|
31
31
|
|
32
32
|
|
33
33
|
<p align="center">
|
34
|
-
<img src="READMEimage/
|
34
|
+
<img src="READMEimage/READMEimg.png" alt="" width="150"/>
|
35
35
|
</p>
|
36
36
|
|
37
37
|
## 🚀 Features
|
38
38
|
|
39
|
-
- **🔐 Bypass/Auto Solve Captchas:** No
|
40
|
-
- **🎵 Use TikTok Sounds:**
|
39
|
+
- **🔐 Bypass/Auto Solve Captchas:** No need to worry about any captchas interrupting the process, they'll be solved!
|
40
|
+
- **🎵 Use TikTok Sounds:** Go viral by seamlessly adding popular TikTok sounds to your videos.
|
41
41
|
- **🗓 Schedule Uploads:** Upload videos at specific times or upto 10 days in advance with our scheduling feature.
|
42
42
|
- **🔍 Copyright Check:** Ensure your video is safe from copyright claims before uploading.
|
43
43
|
- **🏷 Add Working Hashtags:** Increase your reach by adding effective hashtags that actually work.
|
@@ -60,23 +60,22 @@ pip install tiktokautouploader
|
|
60
60
|
- **Note:** The necessary JavaScript dependencies (`playwright`,`playwright-extra`, `puppeteer-extra-plugin-stealth`) will be AUTOMATICALLY installed the first time you run the function, so you don't need to install them manually. Make sure that `npm` (Node.js package manager) is available in your system's PATH.
|
61
61
|
|
62
62
|
|
63
|
-
2. **Browser Binaries:** If you don't have them already, you'll need to install the
|
63
|
+
2. **Browser Binaries:** If you don't have them already, you'll need to install the browser binaries for `playwright`.
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
```bash
|
68
|
-
python -m playwright install
|
69
|
-
```
|
65
|
+
to do so, just run the following command AFTER installing the package:
|
66
|
+
|
67
|
+
```bash
|
68
|
+
python -m playwright install
|
69
|
+
```
|
70
70
|
|
71
71
|
|
72
72
|
## 📝 Quick-Start
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
NOTE: It is highly recommended you read DOCUMENTATION.md before using the library.
|
77
|
-
|
74
|
+
**NOTE:** It is highly recommended you read DOCUMENTATION.md before using the library.
|
78
75
|
The first time you run the code, you will be prompted to log-in, this will only occur the first time the function is used. Check documentation for more info.
|
79
76
|
|
77
|
+
## Upload with hashtags
|
78
|
+
|
80
79
|
```python
|
81
80
|
from tiktokautouploader import upload_tiktok
|
82
81
|
|
@@ -116,6 +115,7 @@ upload_tiktok(video=video_path, description=description, hashtags=hashtags, copy
|
|
116
115
|
- **Maximize your reach:** Add popular sounds and effective hashtags that work to boost visibility.
|
117
116
|
- **Stay compliant:** Built-in copyright checks to avoid unforeseen takedowns.
|
118
117
|
- **Convenient scheduling:** Post at the right time, even when you're away.
|
118
|
+
- **Much faster than manually uploading:** Drastically reduce the time you need to upload videos, just click one button and be done much quicker!
|
119
119
|
|
120
120
|
## 🛠 Dependencies
|
121
121
|
|
@@ -131,7 +131,7 @@ These will be automatically installed when you install the package.
|
|
131
131
|
|
132
132
|
## 👤 Author
|
133
133
|
|
134
|
-
Created by **Haziq
|
134
|
+
Created by **Haziq**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com)
|
135
135
|
|
136
136
|
## 📄 License
|
137
137
|
|
@@ -9,13 +9,13 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
<p align="center">
|
12
|
-
<img src="READMEimage/
|
12
|
+
<img src="READMEimage/READMEimg.png" alt="" width="150"/>
|
13
13
|
</p>
|
14
14
|
|
15
15
|
## 🚀 Features
|
16
16
|
|
17
|
-
- **🔐 Bypass/Auto Solve Captchas:** No
|
18
|
-
- **🎵 Use TikTok Sounds:**
|
17
|
+
- **🔐 Bypass/Auto Solve Captchas:** No need to worry about any captchas interrupting the process, they'll be solved!
|
18
|
+
- **🎵 Use TikTok Sounds:** Go viral by seamlessly adding popular TikTok sounds to your videos.
|
19
19
|
- **🗓 Schedule Uploads:** Upload videos at specific times or upto 10 days in advance with our scheduling feature.
|
20
20
|
- **🔍 Copyright Check:** Ensure your video is safe from copyright claims before uploading.
|
21
21
|
- **🏷 Add Working Hashtags:** Increase your reach by adding effective hashtags that actually work.
|
@@ -38,23 +38,22 @@ pip install tiktokautouploader
|
|
38
38
|
- **Note:** The necessary JavaScript dependencies (`playwright`,`playwright-extra`, `puppeteer-extra-plugin-stealth`) will be AUTOMATICALLY installed the first time you run the function, so you don't need to install them manually. Make sure that `npm` (Node.js package manager) is available in your system's PATH.
|
39
39
|
|
40
40
|
|
41
|
-
2. **Browser Binaries:** If you don't have them already, you'll need to install the
|
41
|
+
2. **Browser Binaries:** If you don't have them already, you'll need to install the browser binaries for `playwright`.
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
```bash
|
46
|
-
python -m playwright install
|
47
|
-
```
|
43
|
+
to do so, just run the following command AFTER installing the package:
|
44
|
+
|
45
|
+
```bash
|
46
|
+
python -m playwright install
|
47
|
+
```
|
48
48
|
|
49
49
|
|
50
50
|
## 📝 Quick-Start
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
NOTE: It is highly recommended you read DOCUMENTATION.md before using the library.
|
55
|
-
|
52
|
+
**NOTE:** It is highly recommended you read DOCUMENTATION.md before using the library.
|
56
53
|
The first time you run the code, you will be prompted to log-in, this will only occur the first time the function is used. Check documentation for more info.
|
57
54
|
|
55
|
+
## Upload with hashtags
|
56
|
+
|
58
57
|
```python
|
59
58
|
from tiktokautouploader import upload_tiktok
|
60
59
|
|
@@ -94,6 +93,7 @@ upload_tiktok(video=video_path, description=description, hashtags=hashtags, copy
|
|
94
93
|
- **Maximize your reach:** Add popular sounds and effective hashtags that work to boost visibility.
|
95
94
|
- **Stay compliant:** Built-in copyright checks to avoid unforeseen takedowns.
|
96
95
|
- **Convenient scheduling:** Post at the right time, even when you're away.
|
96
|
+
- **Much faster than manually uploading:** Drastically reduce the time you need to upload videos, just click one button and be done much quicker!
|
97
97
|
|
98
98
|
## 🛠 Dependencies
|
99
99
|
|
@@ -109,7 +109,7 @@ These will be automatically installed when you install the package.
|
|
109
109
|
|
110
110
|
## 👤 Author
|
111
111
|
|
112
|
-
Created by **Haziq
|
112
|
+
Created by **Haziq**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com)
|
113
113
|
|
114
114
|
## 📄 License
|
115
115
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "tiktokautouploader"
|
7
|
-
version = "2.
|
7
|
+
version = "2.93"
|
8
8
|
description = "Upload or schedule videos to TikTok with viral TikTok sounds and hashtags."
|
9
9
|
readme = {file = "README.md", content-type = "text/markdown"}
|
10
10
|
keywords = ["tiktok", "autoupload", "tiktokautoupload"]
|
@@ -36,7 +36,7 @@ tags = ["wheel"]
|
|
36
36
|
|
37
37
|
[tool.hatch.metadata]
|
38
38
|
name = "tiktokautouploader"
|
39
|
-
version = "2.
|
39
|
+
version = "2.93"
|
40
40
|
description = "Upload or schedule videos to TikTok with TikTok sounds and hashtags that work."
|
41
41
|
readme = {file = "README.md", content-type = "text/markdown"}
|
42
42
|
keywords = ["tiktok", "autoupload", "tiktokautoupload"]
|
@@ -9,7 +9,7 @@ from PIL import Image
|
|
9
9
|
import sys
|
10
10
|
import os
|
11
11
|
import warnings
|
12
|
-
warnings.
|
12
|
+
warnings.simplefilter("ignore")
|
13
13
|
|
14
14
|
def login_warning():
|
15
15
|
print("NO COOKIES FILE FOUND, PLEASE LOG-IN WHEN PROMPTED")
|
@@ -38,6 +38,7 @@ def check_expiry():
|
|
38
38
|
def run_javascript():
|
39
39
|
js_file_path = pkg_resources.resource_filename(__name__, 'Js_assets/login.js')
|
40
40
|
result = subprocess.run(['node', js_file_path], capture_output=True, text=True)
|
41
|
+
return result
|
41
42
|
|
42
43
|
def install_js_dependencies():
|
43
44
|
js_dir = pkg_resources.resource_filename(__name__, 'Js_assets')
|
@@ -46,6 +47,7 @@ def install_js_dependencies():
|
|
46
47
|
if not os.path.exists(node_modules_path):
|
47
48
|
print("JavaScript dependencies not found. Installing...")
|
48
49
|
subprocess.run(['npm', 'install', 'playwright', 'playwright-extra', 'puppeteer-extra-plugin-stealth', '--silent'], cwd=js_dir, check=True)
|
50
|
+
subprocess.run(['npx', 'playwright', 'install', 'chromium'], cwd=js_dir, check=True)
|
49
51
|
else:
|
50
52
|
time.sleep(0.1)
|
51
53
|
|
@@ -220,7 +222,6 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
220
222
|
|
221
223
|
retries = 0
|
222
224
|
cookie_read = False
|
223
|
-
install_js_dependencies()
|
224
225
|
|
225
226
|
if os.path.exists('TK_cookies.json'):
|
226
227
|
cookies, cookie_read = read_cookies(cookies_path='TK_cookies.json')
|
@@ -231,8 +232,9 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
231
232
|
cookie_read = False
|
232
233
|
|
233
234
|
if cookie_read == False:
|
235
|
+
install_js_dependencies()
|
234
236
|
login_warning()
|
235
|
-
run_javascript()
|
237
|
+
result = run_javascript()
|
236
238
|
|
237
239
|
cookies, cookie_read = read_cookies("TK_cookies.json")
|
238
240
|
if cookie_read == False:
|
@@ -241,13 +243,12 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
241
243
|
|
242
244
|
with sync_playwright() as p:
|
243
245
|
|
244
|
-
browser = p.
|
246
|
+
browser = p.webkit.launch(headless=False)
|
245
247
|
|
246
248
|
context = browser.new_context()
|
247
249
|
context.add_cookies(cookies)
|
248
250
|
page = context.new_page()
|
249
251
|
url = 'https://www.tiktok.com/tiktokstudio/upload?from=upload&lang=en'
|
250
|
-
url2 = 'https://www.tiktok.com/tiktokstudio/content?tab=draft'
|
251
252
|
|
252
253
|
while retries < 2:
|
253
254
|
try:
|
@@ -418,7 +419,7 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
418
419
|
time.sleep(0.2)
|
419
420
|
if suppressprint == False:
|
420
421
|
print("Tik tok done loading file onto servers")
|
421
|
-
|
422
|
+
|
422
423
|
if schedule != None:
|
423
424
|
try:
|
424
425
|
hour = schedule[0:2]
|
@@ -464,90 +465,8 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
464
465
|
|
465
466
|
if (schedule == None) and (day != None):
|
466
467
|
sys.exit("ERROR: CANT SCHEDULE FOR ANOTHER DAY USING 'day' WITHOUT ALSO INCLUDING TIME OF UPLOAD WITH 'schedule'; PLEASE ALSO INCLUDE TIME WITH 'schedule' PARAMETER")
|
467
|
-
|
468
|
-
|
469
|
-
if(sound_name == None):
|
470
|
-
if copyrightcheck == True:
|
471
|
-
page.locator(".TUXSwitch-input").nth(0).click()
|
472
|
-
while copyrightcheck == True:
|
473
|
-
time.sleep(0.2)
|
474
|
-
if page.locator("span", has_text="No issues detected.").is_visible():
|
475
|
-
if suppressprint == False:
|
476
|
-
print("Copyright check complete")
|
477
|
-
break
|
478
|
-
if page.locator("span", has_text="Copyright issues detected.").is_visible():
|
479
|
-
sys.exit("COPYRIGHT CHECK FAILED: COPYRIGHT AUDIO DETECTED FROM TIKTOK")
|
480
|
-
|
481
|
-
if schedule == None:
|
482
|
-
page.click('button.TUXButton.TUXButton--default.TUXButton--large.TUXButton--primary:has-text("Post")', timeout=10000)
|
483
|
-
uploaded = False
|
484
|
-
checks = 0
|
485
|
-
while uploaded == False:
|
486
|
-
if page.locator(':has-text("Leaving the page does not interrupt")').nth(0).is_visible():
|
487
|
-
time.sleep(0.2)
|
488
|
-
break
|
489
|
-
time.sleep(0.2)
|
490
|
-
checks += 1
|
491
|
-
if checks > 100:
|
492
|
-
time.sleep(10)
|
493
|
-
if checks == 150:
|
494
|
-
break
|
495
|
-
else:
|
496
|
-
page.click('button.TUXButton.TUXButton--default.TUXButton--large.TUXButton--primary:has-text("Schedule")', timeout=10000)
|
497
|
-
uploaded = False
|
498
|
-
checks = 0
|
499
|
-
while uploaded == False:
|
500
|
-
if page.locator(':has-text("Leaving the page does not interrupt")').nth(0).is_visible():
|
501
|
-
time.sleep(0.2)
|
502
|
-
break
|
503
|
-
time.sleep(0.2)
|
504
|
-
checks += 1
|
505
|
-
if checks > 100:
|
506
|
-
time.sleep(10)
|
507
|
-
if checks == 150:
|
508
|
-
break
|
509
|
-
if suppressprint == False:
|
510
|
-
print("Done uploading video, NOTE: it may take a minute or two to show on TikTok")
|
511
468
|
|
512
|
-
|
513
|
-
|
514
|
-
else:
|
515
|
-
try:
|
516
|
-
page.click('button.TUXButton.TUXButton--default.TUXButton--large.TUXButton--secondary:has-text("Save draft")', timeout=10000)
|
517
|
-
except:
|
518
|
-
sys.exit("SAVE AS DRAFT BUTTON NOT FOUND; CANNOT ADD SOUND WITHOUT ABILITY TO SAVE DRAFTS")
|
519
|
-
|
520
|
-
time.sleep(0.5)
|
521
|
-
page.close()
|
522
|
-
|
523
|
-
browser = p.chromium.launch(headless=True)
|
524
|
-
|
525
|
-
context = browser.new_context()
|
526
|
-
context.add_cookies(cookies)
|
527
|
-
page = context.new_page()
|
528
|
-
url2 = 'https://www.tiktok.com/tiktokstudio/content?tab=draft'
|
529
|
-
|
530
|
-
while retries < 2:
|
531
|
-
try:
|
532
|
-
page.goto(url2, timeout=30000)
|
533
|
-
except:
|
534
|
-
retries +=1
|
535
|
-
time.sleep(5)
|
536
|
-
if retries == 2:
|
537
|
-
sys.exit("ERROR: TIK TOK PAGE FAILED TO LOAD, try again.")
|
538
|
-
else:
|
539
|
-
break
|
540
|
-
|
541
|
-
try:
|
542
|
-
page.wait_for_selector("path[d='M37.37 4.85a4.01 4.01 0 0 0-.99-.79 3 3 0 0 0-2.72 0c-.45.23-.81.6-1 .79a9 9 0 0 1-.04.05l-19.3 19.3c-1.64 1.63-2.53 2.52-3.35 3.47a36 36 0 0 0-4.32 6.16c-.6 1.1-1.14 2.24-2.11 4.33l-.3.6c-.4.75-.84 1.61-.8 2.43a2.5 2.5 0 0 0 2.37 2.36c.82.05 1.68-.4 2.44-.79l.59-.3c2.09-.97 3.23-1.5 4.33-2.11a36 36 0 0 0 6.16-4.32c.95-.82 1.84-1.71 3.47-3.34l19.3-19.3.05-.06a3 3 0 0 0 .78-3.71c-.22-.45-.6-.81-.78-1l-.02-.02-.03-.03-3.67-3.67a8.7 8.7 0 0 1-.06-.05ZM16.2 26.97 35.02 8.15l2.83 2.83L19.03 29.8c-1.7 1.7-2.5 2.5-3.33 3.21a32 32 0 0 1-7.65 4.93 32 32 0 0 1 4.93-7.65c.73-.82 1.51-1.61 3.22-3.32Z']")
|
543
|
-
page.click("path[d='M37.37 4.85a4.01 4.01 0 0 0-.99-.79 3 3 0 0 0-2.72 0c-.45.23-.81.6-1 .79a9 9 0 0 1-.04.05l-19.3 19.3c-1.64 1.63-2.53 2.52-3.35 3.47a36 36 0 0 0-4.32 6.16c-.6 1.1-1.14 2.24-2.11 4.33l-.3.6c-.4.75-.84 1.61-.8 2.43a2.5 2.5 0 0 0 2.37 2.36c.82.05 1.68-.4 2.44-.79l.59-.3c2.09-.97 3.23-1.5 4.33-2.11a36 36 0 0 0 6.16-4.32c.95-.82 1.84-1.71 3.47-3.34l19.3-19.3.05-.06a3 3 0 0 0 .78-3.71c-.22-.45-.6-.81-.78-1l-.02-.02-.03-.03-3.67-3.67a8.7 8.7 0 0 1-.06-.05ZM16.2 26.97 35.02 8.15l2.83 2.83L19.03 29.8c-1.7 1.7-2.5 2.5-3.33 3.21a32 32 0 0 1-7.65 4.93 32 32 0 0 1 4.93-7.65c.73-.82 1.51-1.61 3.22-3.32Z']")
|
544
|
-
page.wait_for_selector('div[data-contents="true"]')
|
545
|
-
page.wait_for_function("document.querySelector('.info-progress-num').textContent.trim() === '100%'", timeout=3000000)
|
546
|
-
time.sleep(0.2)
|
547
|
-
except:
|
548
|
-
sys.exit("ERROR ADDING SOUND: Video saved as draft")
|
549
|
-
|
550
|
-
if sound_name != None:
|
469
|
+
if sound_name != None:
|
551
470
|
page.click("div.TUXButton-label:has-text('Edit video')")
|
552
471
|
page.wait_for_selector("input.search-bar-input")
|
553
472
|
page.fill(f"input.search-bar-input", f"{sound_name}")
|
@@ -602,9 +521,9 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
602
521
|
if suppressprint == False:
|
603
522
|
print("Added sound")
|
604
523
|
|
605
|
-
|
524
|
+
page.wait_for_selector('div[data-contents="true"]')
|
606
525
|
|
607
|
-
|
526
|
+
if copyrightcheck == True:
|
608
527
|
page.locator(".TUXSwitch-input").nth(0).click()
|
609
528
|
while copyrightcheck == True:
|
610
529
|
time.sleep(0.2)
|
@@ -616,40 +535,40 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
616
535
|
sys.exit("COPYRIGHT CHECK FAILED: VIDEO SAVED AS DRAFT, COPYRIGHT AUDIO DETECTED FROM TIKTOK")
|
617
536
|
|
618
537
|
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
time.sleep(0.2)
|
627
|
-
break
|
538
|
+
try:
|
539
|
+
if schedule == None:
|
540
|
+
page.click('button.TUXButton.TUXButton--default.TUXButton--large.TUXButton--primary:has-text("Post")', timeout=10000)
|
541
|
+
uploaded = False
|
542
|
+
checks = 0
|
543
|
+
while uploaded == False:
|
544
|
+
if page.locator(':has-text("Leaving the page does not interrupt")').nth(0).is_visible():
|
628
545
|
time.sleep(0.2)
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
546
|
+
break
|
547
|
+
time.sleep(0.2)
|
548
|
+
checks += 1
|
549
|
+
if checks > 100:
|
550
|
+
time.sleep(10)
|
551
|
+
if checks == 150:
|
552
|
+
break
|
553
|
+
else:
|
554
|
+
page.click('button.TUXButton.TUXButton--default.TUXButton--large.TUXButton--primary:has-text("Schedule")', timeout=10000)
|
555
|
+
uploaded = False
|
556
|
+
checks = 0
|
557
|
+
while uploaded == False:
|
558
|
+
if page.locator(':has-text("Leaving the page does not interrupt")').nth(0).is_visible():
|
642
559
|
time.sleep(0.2)
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
time.sleep(
|
560
|
+
break
|
561
|
+
time.sleep(0.2)
|
562
|
+
checks += 1
|
563
|
+
if checks > 100:
|
564
|
+
time.sleep(10)
|
565
|
+
if checks == 150:
|
566
|
+
break
|
567
|
+
if suppressprint == False:
|
568
|
+
print("Done uploading video, NOTE: it may take a minute or two to show on TikTok")
|
569
|
+
except:
|
570
|
+
time.sleep(5)
|
571
|
+
sys.exit("ERROR UPLOADING: VIDEO HAS SAVED AS DRAFT BUT CANT UPLOAD")
|
572
|
+
time.sleep(1)
|
654
573
|
|
655
|
-
|
574
|
+
page.close()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|