tiktokautouploader 2.9__py2.py3-none-any.whl → 2.81__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.
@@ -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 > 10:
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(1)
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)
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.3
2
+ Name: tiktokautouploader
3
+ Version: 2.81
4
+ Summary: Upload or schedule videos to TikTok with TikTok sounds and hashtags that work.
5
+ Project-URL: Homepage, https://github.com/haziq-exe/TikTokAutoUploader
6
+ Author-email: HAZIQ <haziqmk123@gmail.com>
7
+ License-File: LICENSE.md
8
+ Keywords: autoupload,tiktok,tiktokautoupload
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Requires-Dist: pillow>=8.0.0
17
+ Requires-Dist: playwright>=1.0.0
18
+ Requires-Dist: requests>=2.0.0
19
+ Requires-Dist: scikit-learn>=0.24.0
@@ -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.81.dist-info/METADATA,sha256=neZbcv9aKX3qw-uKHc-L98vSAWLUUrg6Oa1BH0uL1vg,810
5
+ tiktokautouploader-2.81.dist-info/WHEEL,sha256=fl6v0VwpzfGBVsGtkAkhILUlJxROXbA3HvRL6Fe3140,105
6
+ tiktokautouploader-2.81.dist-info/licenses/LICENSE.md,sha256=hYds_VJIpnS5gC73WhuWk2IY_e9BWjuEJthQCb9ThyU,1073
7
+ tiktokautouploader-2.81.dist-info/RECORD,,
@@ -1,138 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: tiktokautouploader
3
- Version: 2.9
4
- Summary: Upload or schedule videos to TikTok with viral TikTok sounds and hashtags.
5
- Project-URL: Homepage, https://github.com/haziq-exe/TikTokAutoUploader
6
- Author-email: HAZIQ <haziqmk123@gmail.com>
7
- License-File: LICENSE.md
8
- Keywords: autoupload,tiktok,tiktokautoupload
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Requires-Dist: pillow>=8.0.0
17
- Requires-Dist: playwright>=1.0.0
18
- Requires-Dist: requests>=2.0.0
19
- Requires-Dist: scikit-learn>=0.24.0
20
- Description-Content-Type: text/markdown
21
-
22
- <div align="center">
23
- <h1>tiktokautouploader</h1>
24
- </div>
25
-
26
-
27
- ### AUTOMATE TIKTOK UPLOADS 🤖. USE TRENDING SOUNDS 🔊, ADD WORKING HASHTAGS 💯, SCHEDULE UPLOADS 🗓️, AUTOSOLVES CAPTCHAS 🧠, AND MORE 🎁
28
-
29
- [![PyPI version](https://img.shields.io/pypi/v/tiktokautouploader.svg)](https://pypi.org/project/tiktokautouploader/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
30
-
31
-
32
- <p align="center">
33
- <img src="READMEimage/Image.png" alt="" width="400"/>
34
- </p>
35
-
36
- ## 🚀 Features
37
-
38
- - **🔐 Bypass/Auto Solve Captchas:** No more manual captcha solving; fully automated process!
39
- - **🎵 Use TikTok Sounds:** Seamlessly add popular TikTok sounds to your videos.
40
- - **🗓 Schedule Uploads:** Upload videos at specific times or upto 10 days in advance with our scheduling feature.
41
- - **🔍 Copyright Check:** Ensure your video is safe from copyright claims before uploading.
42
- - **🏷 Add Working Hashtags:** Increase your reach by adding effective hashtags that actually work.
43
-
44
-
45
- ## 📦 Installation
46
-
47
- 1. **Python Installation:** Install the package using `pip`:
48
-
49
- ```bash
50
- pip install tiktokautouploader
51
- ```
52
-
53
- ---
54
-
55
- ## ⚙️ Pre-requisites
56
-
57
- 1. **Node.js:** You must have Node.js installed on your system, as some parts of this package rely on JavaScript code. If you don't have Node.js installed, you can download it from [nodejs.org](https://nodejs.org/).
58
-
59
- - **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.
60
-
61
-
62
- 2. **Browser Binaries:** If you don't have them already, you'll need to install the chromium browser binary for `playwright`.
63
-
64
- To do so, just run the following command AFTER installing the package:
65
-
66
- ```bash
67
- python -m playwright install chromium
68
- ```
69
-
70
-
71
- ## 📝 Quick-Start
72
-
73
- Here's how to upload a video to TikTok with hashtags using `tiktokautouploader`:
74
-
75
- NOTE: It is highly recommended you read DOCUMENTATION.md before using the library.
76
-
77
- 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.
78
-
79
- ```python
80
- from tiktokautouploader import upload_tiktok
81
-
82
- video_path = 'path/to/your/video.mp4'
83
- description = 'Check out my latest TikTok video!'
84
- hashtags = ['#fun', '#viral']
85
-
86
- upload_tiktok(video=video_path, description=description, hashtags=hashtags)
87
-
88
- ```
89
-
90
- ### Upload with TikTok Sound
91
-
92
- ```python
93
- upload_tiktok(video=video_path, description=description, sound_name='trending_sound', sound_aud_vol='main')
94
- ```
95
-
96
- PLEASE READ DOCUMENTATION FOR MORE INFO.
97
-
98
- ### Schedule an Upload
99
-
100
- ```python
101
- upload_tiktok(video=video_path, description=description, schedule='03:10', day=11)
102
- ```
103
-
104
- PLEASE READ DOCUMENTATION FOR MORE INFO
105
-
106
- ### Perform Copyright Check Before Uploading
107
-
108
- ```python
109
- upload_tiktok(video=video_path, description=description, hashtags=hashtags, copyrightcheck=True)
110
- ```
111
-
112
- ## 🎯 Why Choose `autotiktokuploader`?
113
-
114
- - **No more captchas:** Fully automated uploads without interruptions, If captchas do show up, no worries, they will be solved. (read documentation for more info)
115
- - **Maximize your reach:** Add popular sounds and effective hashtags that work to boost visibility.
116
- - **Stay compliant:** Built-in copyright checks to avoid unforeseen takedowns.
117
- - **Convenient scheduling:** Post at the right time, even when you're away.
118
-
119
- ## 🛠 Dependencies
120
-
121
- This library requires the following dependencies:
122
-
123
- - `playwright`
124
- - `requests`
125
- - `Pillow`
126
- - `scikit-learn`
127
- - `inference`
128
-
129
- These will be automatically installed when you install the package.
130
-
131
- ## 👤 Author
132
-
133
- Created by **Haziq Khalid**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com) or my LinkedIn.
134
-
135
- ## 📄 License
136
-
137
- This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
138
- ```
@@ -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,,