tiktokautouploader 2.9__py2.py3-none-any.whl → 2.85__py2.py3-none-any.whl
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/function.py +4 -31
- {tiktokautouploader-2.9.dist-info → tiktokautouploader-2.85.dist-info}/METADATA +1 -1
- tiktokautouploader-2.85.dist-info/RECORD +7 -0
- tiktokautouploader-2.9.dist-info/RECORD +0 -7
- {tiktokautouploader-2.9.dist-info → tiktokautouploader-2.85.dist-info}/WHEEL +0 -0
- {tiktokautouploader-2.9.dist-info → tiktokautouploader-2.85.dist-info}/licenses/LICENSE.md +0 -0
tiktokautouploader/function.py
CHANGED
@@ -11,6 +11,7 @@ import os
|
|
11
11
|
import warnings
|
12
12
|
warnings.filterwarnings("ignore")
|
13
13
|
|
14
|
+
|
14
15
|
def login_warning():
|
15
16
|
print("NO COOKIES FILE FOUND, PLEASE LOG-IN WHEN PROMPTED")
|
16
17
|
|
@@ -18,23 +19,6 @@ def save_cookies(cookies):
|
|
18
19
|
with open('TK_cookies.json', 'w') as file:
|
19
20
|
json.dump(cookies, file, indent=4)
|
20
21
|
|
21
|
-
def check_expiry():
|
22
|
-
with open('TK_cookies.json', 'r') as file:
|
23
|
-
cookies = json.load(file)
|
24
|
-
|
25
|
-
current_time = int(time.time())
|
26
|
-
cookies_expire = []
|
27
|
-
expired = False
|
28
|
-
for cookie in cookies:
|
29
|
-
if cookie['name'] in ['sessionid', 'sid_tt', 'sessionid_ss', 'passport_auth_status']:
|
30
|
-
expiry = cookie.get('expires')
|
31
|
-
cookies_expire.append(expiry < current_time)
|
32
|
-
|
33
|
-
if all(cookies_expire):
|
34
|
-
expired = True
|
35
|
-
|
36
|
-
return expired
|
37
|
-
|
38
22
|
def run_javascript():
|
39
23
|
js_file_path = pkg_resources.resource_filename(__name__, 'Js_assets/login.js')
|
40
24
|
result = subprocess.run(['node', js_file_path], capture_output=True, text=True)
|
@@ -220,17 +204,12 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
220
204
|
|
221
205
|
retries = 0
|
222
206
|
cookie_read = False
|
223
|
-
install_js_dependencies()
|
224
207
|
|
225
208
|
if os.path.exists('TK_cookies.json'):
|
226
209
|
cookies, cookie_read = read_cookies(cookies_path='TK_cookies.json')
|
227
|
-
expired = check_expiry()
|
228
|
-
if expired == True:
|
229
|
-
os.remove('TK_cookies.json')
|
230
|
-
print("COOKIES EXPIRED, PLEASE LOG-IN AGAIN")
|
231
|
-
cookie_read = False
|
232
210
|
|
233
211
|
if cookie_read == False:
|
212
|
+
install_js_dependencies()
|
234
213
|
login_warning()
|
235
214
|
run_javascript()
|
236
215
|
|
@@ -350,7 +329,7 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
350
329
|
click_on_objects(page, webpage_coords)
|
351
330
|
time.sleep(0.5)
|
352
331
|
page.click("div.verify-captcha-submit-button")
|
353
|
-
if attempts >
|
332
|
+
if attempts > 5:
|
354
333
|
sys.exit("FAILED TO SOLVE CAPTCHA")
|
355
334
|
try:
|
356
335
|
page.wait_for_selector('.upload-text-container', timeout=5000)
|
@@ -430,13 +409,7 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
430
409
|
sys.exit("SCHEDULE TIME ERROR: PLEASE MAKE SURE YOUR SCHEDULE TIME IS A STRING THAT FOLLOWS THE 24H FORMAT 'HH:MM', VIDEO SAVED AS DRAFT")
|
431
410
|
|
432
411
|
page.locator('div.TUXRadioStandalone.TUXRadioStandalone--medium').nth(1).click()
|
433
|
-
time.sleep(
|
434
|
-
if page.locator('button.TUXButton.TUXButton--default.TUXButton--medium.TUXButton--primary:has-text("Allow")').nth(0).is_visible():
|
435
|
-
page.locator('button.TUXButton.TUXButton--default.TUXButton--medium.TUXButton--primary:has-text("Allow")').nth(0).click()
|
436
|
-
time.sleep(0.2)
|
437
|
-
else:
|
438
|
-
if page.locator('div.TUXTextInputCore-trailingIconWrapper').nth(1).is_visible():
|
439
|
-
time.sleep(0.2)
|
412
|
+
time.sleep(0.2)
|
440
413
|
if day != None:
|
441
414
|
page.locator('div.TUXTextInputCore-trailingIconWrapper').nth(1).click()
|
442
415
|
time.sleep(0.2)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: tiktokautouploader
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.85
|
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>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
tiktokautouploader/__init__.py,sha256=u7OWCK_u68ST8dfrkSF4Yw44CJOzV9NXI6ASRuoDfmE,64
|
2
|
+
tiktokautouploader/function.py,sha256=6v89pLpulCIYD6KjfN_rphFUVGclGvnQBlNsoxBPU7Q,31509
|
3
|
+
tiktokautouploader/Js_assets/login.js,sha256=SLhtPYo8ZfTRUnbR7Xqp084lSuAOqIWUxi75FlFH3vs,966
|
4
|
+
tiktokautouploader-2.85.dist-info/METADATA,sha256=0SUpoRf0G6kdkLe0YDL8x3T6GB0Cd6EVvCheOwq0nKU,4879
|
5
|
+
tiktokautouploader-2.85.dist-info/WHEEL,sha256=fl6v0VwpzfGBVsGtkAkhILUlJxROXbA3HvRL6Fe3140,105
|
6
|
+
tiktokautouploader-2.85.dist-info/licenses/LICENSE.md,sha256=hYds_VJIpnS5gC73WhuWk2IY_e9BWjuEJthQCb9ThyU,1073
|
7
|
+
tiktokautouploader-2.85.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
tiktokautouploader/__init__.py,sha256=u7OWCK_u68ST8dfrkSF4Yw44CJOzV9NXI6ASRuoDfmE,64
|
2
|
-
tiktokautouploader/function.py,sha256=xH9h_yIxwuUo-CfvR1NpHDyGBhrS-6n-enNMx1l2Dqw,32635
|
3
|
-
tiktokautouploader/Js_assets/login.js,sha256=SLhtPYo8ZfTRUnbR7Xqp084lSuAOqIWUxi75FlFH3vs,966
|
4
|
-
tiktokautouploader-2.9.dist-info/METADATA,sha256=nIX_7UaWoh3EGi-RqElLzdZpT026RxvO0pABzqm7LZo,4878
|
5
|
-
tiktokautouploader-2.9.dist-info/WHEEL,sha256=fl6v0VwpzfGBVsGtkAkhILUlJxROXbA3HvRL6Fe3140,105
|
6
|
-
tiktokautouploader-2.9.dist-info/licenses/LICENSE.md,sha256=hYds_VJIpnS5gC73WhuWk2IY_e9BWjuEJthQCb9ThyU,1073
|
7
|
-
tiktokautouploader-2.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|