tiktokautouploader 2.96__py2.py3-none-any.whl → 2.97__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 +23 -2
- {tiktokautouploader-2.96.dist-info → tiktokautouploader-2.97.dist-info}/METADATA +1 -1
- tiktokautouploader-2.97.dist-info/RECORD +7 -0
- tiktokautouploader-2.96.dist-info/RECORD +0 -7
- {tiktokautouploader-2.96.dist-info → tiktokautouploader-2.97.dist-info}/WHEEL +0 -0
- {tiktokautouploader-2.96.dist-info → tiktokautouploader-2.97.dist-info}/licenses/LICENSE.md +0 -0
tiktokautouploader/function.py
CHANGED
@@ -11,6 +11,17 @@ import os
|
|
11
11
|
import warnings
|
12
12
|
warnings.simplefilter("ignore")
|
13
13
|
|
14
|
+
|
15
|
+
def check_for_updates():
|
16
|
+
current_version = pkg_resources.get_distribution("tiktokautouploader").version
|
17
|
+
response = requests.get("https://pypi.org/pypi/tiktokautouploader/json")
|
18
|
+
|
19
|
+
if response.status_code == 200:
|
20
|
+
latest_version = response.json()["info"]["version"]
|
21
|
+
if current_version != latest_version:
|
22
|
+
print(f"WARNING: You are using version {current_version} of tiktokautouploader, "
|
23
|
+
f"PLEASE UPDATE TO LATEST VERSION {latest_version} FOR BUG FIXES.")
|
24
|
+
|
14
25
|
def login_warning():
|
15
26
|
print("NO COOKIES FILE FOUND, PLEASE LOG-IN WHEN PROMPTED")
|
16
27
|
|
@@ -228,6 +239,10 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
228
239
|
suppressprint (bool) -> True means function doesnt print anything to provide updates on progress
|
229
240
|
--------------------------------------------------------------------------------------------------------------------------------------------
|
230
241
|
"""
|
242
|
+
try:
|
243
|
+
check_for_updates()
|
244
|
+
except:
|
245
|
+
time.sleep(0.1)
|
231
246
|
|
232
247
|
retries = 0
|
233
248
|
cookie_read = False
|
@@ -298,7 +313,7 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
298
313
|
question = page.locator('div.VerifyBar___StyledDiv-sc-12zaxoy-0.hRJhHT').text_content()
|
299
314
|
if time.time() - start_time > 2:
|
300
315
|
break
|
301
|
-
if 'Select 2 objects that are the same' in question:
|
316
|
+
if 'Select 2 objects that are the same' in question or 'Select two objects that are the same' in question:
|
302
317
|
found = False
|
303
318
|
while found == False:
|
304
319
|
page.click('span.secsdk_captcha_refresh--text')
|
@@ -319,7 +334,10 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
319
334
|
image_width_real, image_height_real = image_size
|
320
335
|
|
321
336
|
webpage_coords = convert_to_webpage_coordinates(b_box, image_x, image_y, image_height_web, image_width_web, image_height_real, image_width_real)
|
337
|
+
if not webpage_coords:
|
338
|
+
webpage_coords.append((image_x + 50, image_y + 50))
|
322
339
|
click_on_objects(page, webpage_coords)
|
340
|
+
page.click("div.verify-captcha-submit-button")
|
323
341
|
time.sleep(0.5)
|
324
342
|
if attempts > 5:
|
325
343
|
sys.exit("FAILED TO SOLVE CAPTCHA")
|
@@ -327,6 +345,7 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
327
345
|
if page.locator("div.captcha_verify_message.captcha_verify_message-pass").is_visible():
|
328
346
|
solved = True
|
329
347
|
showedup = True
|
348
|
+
os.remove('captcha_image.jpg')
|
330
349
|
if page.locator("div.captcha_verify_message.captcha_verify_message-fail").is_visible():
|
331
350
|
showedup = True
|
332
351
|
oldQ = question
|
@@ -363,9 +382,11 @@ def upload_tiktok(video, description, hashtags=None, sound_name=None, sound_aud_
|
|
363
382
|
image_width_real, image_height_real = image_size
|
364
383
|
|
365
384
|
webpage_coords = convert_to_webpage_coordinates(b_box, image_x, image_y, image_height_web, image_width_web, image_height_real, image_width_real)
|
366
|
-
|
385
|
+
if not webpage_coords:
|
386
|
+
webpage_coords.append((image_x + 50, image_y + 50))
|
367
387
|
click_on_objects(page, webpage_coords)
|
368
388
|
page.click("div.verify-captcha-submit-button")
|
389
|
+
time.sleep(1)
|
369
390
|
if attempts > 20:
|
370
391
|
sys.exit("FAILED TO SOLVE CAPTCHA")
|
371
392
|
showedup = False
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: tiktokautouploader
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.97
|
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=G1yucOcm2HNn9P8ulu6sWkOswX5Z-jC_GFsIN0TT27U,34680
|
3
|
+
tiktokautouploader/Js_assets/login.js,sha256=SLhtPYo8ZfTRUnbR7Xqp084lSuAOqIWUxi75FlFH3vs,966
|
4
|
+
tiktokautouploader-2.97.dist-info/METADATA,sha256=3bSTLqLWCwtzwG-pn-QPaAiIu2pC1L3W438YzX4FoAw,5344
|
5
|
+
tiktokautouploader-2.97.dist-info/WHEEL,sha256=fl6v0VwpzfGBVsGtkAkhILUlJxROXbA3HvRL6Fe3140,105
|
6
|
+
tiktokautouploader-2.97.dist-info/licenses/LICENSE.md,sha256=hYds_VJIpnS5gC73WhuWk2IY_e9BWjuEJthQCb9ThyU,1073
|
7
|
+
tiktokautouploader-2.97.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
tiktokautouploader/__init__.py,sha256=u7OWCK_u68ST8dfrkSF4Yw44CJOzV9NXI6ASRuoDfmE,64
|
2
|
-
tiktokautouploader/function.py,sha256=d3JODI7zeE6WEvHzTsObh1voH7O-Zv1PJfacn1lRH44,33619
|
3
|
-
tiktokautouploader/Js_assets/login.js,sha256=SLhtPYo8ZfTRUnbR7Xqp084lSuAOqIWUxi75FlFH3vs,966
|
4
|
-
tiktokautouploader-2.96.dist-info/METADATA,sha256=ScUrk5fPgVIm1qF8sxmvhr_ZzUVDMwHWlbQ8VSBryfs,5344
|
5
|
-
tiktokautouploader-2.96.dist-info/WHEEL,sha256=fl6v0VwpzfGBVsGtkAkhILUlJxROXbA3HvRL6Fe3140,105
|
6
|
-
tiktokautouploader-2.96.dist-info/licenses/LICENSE.md,sha256=hYds_VJIpnS5gC73WhuWk2IY_e9BWjuEJthQCb9ThyU,1073
|
7
|
-
tiktokautouploader-2.96.dist-info/RECORD,,
|
File without changes
|
File without changes
|