tiktokautouploader 4.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- tiktokautouploader-4.0/.gitignore +4 -0
- tiktokautouploader-4.0/Documentation.md +139 -0
- tiktokautouploader-4.0/LICENSE.md +21 -0
- tiktokautouploader-4.0/PKG-INFO +152 -0
- tiktokautouploader-4.0/README.md +131 -0
- tiktokautouploader-4.0/pyproject.toml +60 -0
- tiktokautouploader-4.0/tiktokautouploader/Js_assets/login.js +40 -0
- tiktokautouploader-4.0/tiktokautouploader/Js_assets/package.json +12 -0
- tiktokautouploader-4.0/tiktokautouploader/__init__.py +3 -0
- tiktokautouploader-4.0/tiktokautouploader/function.py +857 -0
@@ -0,0 +1,139 @@
|
|
1
|
+
# autotiktokuploader Documentation
|
2
|
+
|
3
|
+
This document provides detailed information about the parameters and usage of the `upload_tiktok` function in the **AutoTikTokUploader** library. The function is designed to automate the process of uploading or scheduling videos to TikTok with additional features such as adding TikTok sounds, hashtags, and conducting copyright checks.
|
4
|
+
|
5
|
+
### ❗ Key Sections:
|
6
|
+
|
7
|
+
- **Parameter Explanations**: Provides detailed descriptions of each parameter, including the valid options and their effects.
|
8
|
+
- **Initialization Info**: Details instances that occur during first run of function
|
9
|
+
- **Important Notes**: Highlights important account recommendations and limitations related to TikTok accounts and scheduling.
|
10
|
+
- **Supported Captchas**: Showcases the Captchas the code is able to solve
|
11
|
+
- **Runtime**: Provides an estimate of how much runtime is added by different parameters
|
12
|
+
- **Example Usage**: Demonstrates a practical example of how to use the function.
|
13
|
+
|
14
|
+
## 📜 Function: `upload_tiktok`
|
15
|
+
|
16
|
+
### Parameters
|
17
|
+
|
18
|
+
- **`video`** (str)
|
19
|
+
- The input path for your video file that you want to upload to TikTok.
|
20
|
+
|
21
|
+
- **`description`** (str)
|
22
|
+
- The description text that will accompany the video when uploaded. hashtags included in description will NOT work, must be included in `hashtags` parameter
|
23
|
+
|
24
|
+
- **`accountname`** (str)
|
25
|
+
- The name of the account you want to post on.
|
26
|
+
|
27
|
+
- **NOTE:** When uploading to an account for the FIRST TIME ONLY, you will be prompted to log-in, once you log-in your cookies will be stored and you will not need to log-in to that account again. Read INITIALIZATION section for more info.
|
28
|
+
|
29
|
+
- **`hashtags`** (list of str, optional, default: None)
|
30
|
+
- An array of hashtag strings (e.g., `['#example', '#fun']`) to be added to the video description.
|
31
|
+
|
32
|
+
- **`sound_name`** (str, optional, default: None)
|
33
|
+
- The name of the TikTok sound that you want to use for the video. This sound will be applied during the upload.
|
34
|
+
|
35
|
+
- NOTE: please be specific with sound name (include sound creator name also if possible)
|
36
|
+
|
37
|
+
- **`sound_aud_vol`** (str, optional, default: `'mix'`)
|
38
|
+
- Determines the volume mix between the TikTok sound and the original video audio. Accepts one of the following options:
|
39
|
+
- `'mix'`: The TikTok sound and original audio will have a 50/50 split.
|
40
|
+
- `'background'`: The original audio will be louder, and the TikTok sound will be faintly heard in the background.
|
41
|
+
- `'main'`: The TikTok sound will be louder, and the original audio will be faintly heard in the background.
|
42
|
+
|
43
|
+
- Defaults to `'mix'` if invalid option chosen
|
44
|
+
|
45
|
+
- **`schedule`** (str, optional, default: None)
|
46
|
+
- 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.
|
47
|
+
|
48
|
+
- **`day`** (int, optional, default: None) (requires `schedule` != None)
|
49
|
+
- 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
|
50
|
+
|
51
|
+
- NOTE: You will also need to specify time of upload in `schedule` parameter or else `day` won't work
|
52
|
+
|
53
|
+
**Important**:
|
54
|
+
- You can only schedule a maximum of 10 days in advance.
|
55
|
+
- 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.
|
56
|
+
|
57
|
+
- **`copyrightcheck`** (bool, optional, default: `False`)
|
58
|
+
- If set to `True`, the function will conduct a copyright check on TikTok before uploading. If the check fails, the code execution will stop.
|
59
|
+
|
60
|
+
- **`suppressprint`** (bool, optional, default: `False`)
|
61
|
+
- 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.
|
62
|
+
|
63
|
+
|
64
|
+
## 🛠️ Initialization Info
|
65
|
+
|
66
|
+
- **During FIRST RUN:**
|
67
|
+
|
68
|
+
- Javascript dependencies will be automatically downloaded, once downloaded it will not attempt to download it again unless the files get deleted.
|
69
|
+
|
70
|
+
- 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
|
71
|
+
|
72
|
+
- **When uploading to an account for the FIRST TIME:**
|
73
|
+
|
74
|
+
- You will be asked to log-in to TikTok, your cookies from your log-in will then be stored in a file called `TK_cookies_(youraccountname).json`. You will not need to log-in to that account again after that.
|
75
|
+
|
76
|
+
|
77
|
+
## 📝 Important Notes
|
78
|
+
|
79
|
+
- **VERY IMPORTANT: TikTok Account Recommendations**:
|
80
|
+
- It is recommended to have a TikTok account with at least a few weeks of history built up for the best results.
|
81
|
+
- 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.
|
82
|
+
|
83
|
+
- **Scheduling Limitations**:
|
84
|
+
- The function allows scheduling up to 10 days in advance.
|
85
|
+
- If you need to schedule a video for the next month, the video can only be uploaded within the first 5 days of that month (as long as these days are within 10 days from the current date).
|
86
|
+
|
87
|
+
## ⛔ Supported Captchas:
|
88
|
+
|
89
|
+
### Captcha solver currently supports Captchas of type:
|
90
|
+
<p align="center">
|
91
|
+
<img src="READMEimage/Captcha1.gif" alt="" width="250" loop=infinite/>
|
92
|
+
</p>
|
93
|
+
|
94
|
+
<p align="center">
|
95
|
+
<img src="READMEimage/2ndCaptcha.gif" alt="" width="250" loop=infinite/>
|
96
|
+
</p>
|
97
|
+
|
98
|
+
#### Note:
|
99
|
+
- 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.
|
100
|
+
|
101
|
+
- 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.
|
102
|
+
|
103
|
+
- 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
|
104
|
+
|
105
|
+
## 🕰️ Runtime:
|
106
|
+
**Total runtime depends on your wifi connection and how long TikTok takes to upload your video to their servers, however, here are approximations on how much runtime is added by each parameter**
|
107
|
+
|
108
|
+
- **Captcha's:** 3 - 10 secs (in RARE cases, it may take longer)
|
109
|
+
- **Adding Sound:** 3 - 5 secs
|
110
|
+
- **Scheduling:** 5 - 8 secs
|
111
|
+
- **Copyright Check:** 2 - 5 secs
|
112
|
+
|
113
|
+
- All in all, runtime won't exceed one minute in most cases.
|
114
|
+
|
115
|
+
- **NOTE:** When running for the FIRST TIME ONLY, it may take an extra 20 - 30 seconds at the beginning for the code to start running as libraries are being built
|
116
|
+
|
117
|
+
|
118
|
+
## Example Usage
|
119
|
+
|
120
|
+
Here’s a basic example of how to use the `upload_tiktok` function:
|
121
|
+
|
122
|
+
```python
|
123
|
+
from autotiktokuploader import upload_tiktok
|
124
|
+
|
125
|
+
upload_tiktok(
|
126
|
+
video='path/to/your/video.mp4',
|
127
|
+
description='Check out my latest video!',
|
128
|
+
accountname= 'mytiktokaccount',
|
129
|
+
hashtags=['#fun', '#viral'],
|
130
|
+
sound_name='popular_sound',
|
131
|
+
sound_aud_vol='mix',
|
132
|
+
schedule='15:00',
|
133
|
+
day=5,
|
134
|
+
copyrightcheck=True,
|
135
|
+
suppressprint=False
|
136
|
+
)
|
137
|
+
```
|
138
|
+
|
139
|
+
For more details or if errors persist, please feel free to contact me at haziqmk123@gmail.com or on LinkedIn (on my github profile)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) [2024] [HAZIQ KHALID]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,152 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: tiktokautouploader
|
3
|
+
Version: 4.0
|
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: inference>=0.18.1
|
17
|
+
Requires-Dist: pillow>=8.0.0
|
18
|
+
Requires-Dist: playwright>=1.0.0
|
19
|
+
Requires-Dist: requests>=2.0.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
|
+
<p align="center">
|
32
|
+
<img src="READMEimage/READMEGIF.gif" alt="" width="900"/>
|
33
|
+
</p>
|
34
|
+
|
35
|
+
## 🚀 Features
|
36
|
+
|
37
|
+
- **🔐 Bypass/Auto Solve Captchas:** No need to worry about any captchas interrupting the process, they'll be solved!
|
38
|
+
- **🎵 Use TikTok Sounds:** Go viral by seamlessly adding popular TikTok sounds to your videos.
|
39
|
+
- **🗓 Schedule Uploads:** Upload videos at specific times or upto 10 days in advance with our scheduling feature.
|
40
|
+
- **🔍 Copyright Check:** Ensure your video is safe from copyright claims before uploading.
|
41
|
+
- **🏷 Add Working Hashtags:** Increase your reach by adding effective hashtags that actually work.
|
42
|
+
- **⏰ Cutdown on upload time:** Upload to TikTok with way less hassle and much more speed using our library.
|
43
|
+
- **📝 Upload to different accounts:** Stay organized and on top of multiple different accounts with our multi-account functionality.
|
44
|
+
|
45
|
+
⭐️ If you like this project please feel free to star it, Thank you.
|
46
|
+
|
47
|
+
## 📦 Installation
|
48
|
+
|
49
|
+
1. **Python Installation:** Install the package using `pip`:
|
50
|
+
|
51
|
+
```bash
|
52
|
+
pip install tiktokautouploader
|
53
|
+
```
|
54
|
+
|
55
|
+
**NOTE:** IF YOU HAVE INSTALLED BEFORE, PLEASE MAKE SURE YOU UPGRADE TO THE LATEST VERSION.
|
56
|
+
|
57
|
+
---
|
58
|
+
|
59
|
+
## ⚙️ Pre-requisites
|
60
|
+
|
61
|
+
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/).
|
62
|
+
|
63
|
+
- **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.
|
64
|
+
|
65
|
+
|
66
|
+
2. **Browser Binaries:** If you don't have them already, you'll need to install the browser binaries for `playwright`. This library uses chromium and firefox.
|
67
|
+
|
68
|
+
to do so, just run the following command AFTER installing the package:
|
69
|
+
|
70
|
+
```bash
|
71
|
+
python -m playwright install
|
72
|
+
```
|
73
|
+
|
74
|
+
**NOTE:** If you want to add sounds to your TikTok, you MUST have the ability to save drafts. If you don't want to add sounds then you don't need this feature.
|
75
|
+
|
76
|
+
|
77
|
+
## 📝 Quick-Start
|
78
|
+
|
79
|
+
**NOTE:** It is highly recommended you read DOCUMENTATION.md before using the library.
|
80
|
+
The first time you run the code for an account, you will be prompted to log-in, this will only occur the first time the function is used for the account. Check documentation for more info.
|
81
|
+
|
82
|
+
## Upload with hashtags
|
83
|
+
|
84
|
+
```python
|
85
|
+
from tiktokautouploader import upload_tiktok
|
86
|
+
|
87
|
+
video_path = 'path/to/your/video.mp4'
|
88
|
+
description = 'Check out my latest TikTok video!'
|
89
|
+
accountname = 'mytiktokaccount'
|
90
|
+
hashtags = ['#fun', '#viral']
|
91
|
+
|
92
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, hashtags=hashtags)
|
93
|
+
|
94
|
+
```
|
95
|
+
|
96
|
+
### Upload with TikTok Sound
|
97
|
+
|
98
|
+
```python
|
99
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, sound_name='trending_sound', sound_aud_vol='main')
|
100
|
+
```
|
101
|
+
|
102
|
+
PLEASE READ DOCUMENTATION FOR MORE INFO.
|
103
|
+
|
104
|
+
### Schedule an Upload
|
105
|
+
|
106
|
+
```python
|
107
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, schedule='03:10', day=11)
|
108
|
+
```
|
109
|
+
|
110
|
+
PLEASE READ DOCUMENTATION FOR MORE INFO
|
111
|
+
|
112
|
+
### Perform Copyright Check Before Uploading
|
113
|
+
|
114
|
+
```python
|
115
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, hashtags=hashtags, copyrightcheck=True)
|
116
|
+
```
|
117
|
+
|
118
|
+
## 🎯 Why Choose `autotiktokuploader`?
|
119
|
+
|
120
|
+
- **No more captchas:** Fully automated uploads without interruptions, If captchas do show up, no worries, they will be solved. (read documentation for more info)
|
121
|
+
- **Maximize your reach:** Add popular sounds and effective hashtags that work to boost visibility and go viral!
|
122
|
+
- **Stay compliant:** Built-in copyright checks to avoid unforeseen takedowns.
|
123
|
+
- **Convenient scheduling:** Post at the right time, even when you're away!
|
124
|
+
- **Much faster than manually uploading:** Drastically reduce the time you need to upload videos, just click one button and be done much quicker!
|
125
|
+
- **Upload to different account:** Stay on top of all your TikTok accounts with our multi-account functionality!
|
126
|
+
|
127
|
+
## 🛠 Dependencies
|
128
|
+
|
129
|
+
This library requires the following dependencies:
|
130
|
+
|
131
|
+
- `playwright`
|
132
|
+
- `requests`
|
133
|
+
- `Pillow`
|
134
|
+
- `scikit-learn`
|
135
|
+
- `inference`
|
136
|
+
|
137
|
+
These will be automatically installed when you install the package.
|
138
|
+
|
139
|
+
## 👤 Author
|
140
|
+
|
141
|
+
Created by **Haziq**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com)
|
142
|
+
|
143
|
+
## 📄 License
|
144
|
+
|
145
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
|
146
|
+
|
147
|
+
## 📮 Related Projects
|
148
|
+
|
149
|
+
If you liked this project please check out my use case showcase project that generates TikToks and uploads them using 'tiktokautouploader'
|
150
|
+
|
151
|
+
[TikTokGenerator](https://github.com/haziq-exe/TikTokGenerator)
|
152
|
+
|
@@ -0,0 +1,131 @@
|
|
1
|
+
<div align="center">
|
2
|
+
<h1>tiktokautouploader</h1>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
|
6
|
+
### AUTOMATE TIKTOK UPLOADS 🤖. USE TRENDING SOUNDS 🔊, ADD WORKING HASHTAGS 💯, SCHEDULE UPLOADS 🗓️, AUTOSOLVES CAPTCHAS 🧠, AND MORE 🎁
|
7
|
+
|
8
|
+
[![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)
|
9
|
+
|
10
|
+
<p align="center">
|
11
|
+
<img src="READMEimage/READMEGIF.gif" alt="" width="900"/>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
## 🚀 Features
|
15
|
+
|
16
|
+
- **🔐 Bypass/Auto Solve Captchas:** No need to worry about any captchas interrupting the process, they'll be solved!
|
17
|
+
- **🎵 Use TikTok Sounds:** Go viral by seamlessly adding popular TikTok sounds to your videos.
|
18
|
+
- **🗓 Schedule Uploads:** Upload videos at specific times or upto 10 days in advance with our scheduling feature.
|
19
|
+
- **🔍 Copyright Check:** Ensure your video is safe from copyright claims before uploading.
|
20
|
+
- **🏷 Add Working Hashtags:** Increase your reach by adding effective hashtags that actually work.
|
21
|
+
- **⏰ Cutdown on upload time:** Upload to TikTok with way less hassle and much more speed using our library.
|
22
|
+
- **📝 Upload to different accounts:** Stay organized and on top of multiple different accounts with our multi-account functionality.
|
23
|
+
|
24
|
+
⭐️ If you like this project please feel free to star it, Thank you.
|
25
|
+
|
26
|
+
## 📦 Installation
|
27
|
+
|
28
|
+
1. **Python Installation:** Install the package using `pip`:
|
29
|
+
|
30
|
+
```bash
|
31
|
+
pip install tiktokautouploader
|
32
|
+
```
|
33
|
+
|
34
|
+
**NOTE:** IF YOU HAVE INSTALLED BEFORE, PLEASE MAKE SURE YOU UPGRADE TO THE LATEST VERSION.
|
35
|
+
|
36
|
+
---
|
37
|
+
|
38
|
+
## ⚙️ Pre-requisites
|
39
|
+
|
40
|
+
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/).
|
41
|
+
|
42
|
+
- **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.
|
43
|
+
|
44
|
+
|
45
|
+
2. **Browser Binaries:** If you don't have them already, you'll need to install the browser binaries for `playwright`. This library uses chromium and firefox.
|
46
|
+
|
47
|
+
to do so, just run the following command AFTER installing the package:
|
48
|
+
|
49
|
+
```bash
|
50
|
+
python -m playwright install
|
51
|
+
```
|
52
|
+
|
53
|
+
**NOTE:** If you want to add sounds to your TikTok, you MUST have the ability to save drafts. If you don't want to add sounds then you don't need this feature.
|
54
|
+
|
55
|
+
|
56
|
+
## 📝 Quick-Start
|
57
|
+
|
58
|
+
**NOTE:** It is highly recommended you read DOCUMENTATION.md before using the library.
|
59
|
+
The first time you run the code for an account, you will be prompted to log-in, this will only occur the first time the function is used for the account. Check documentation for more info.
|
60
|
+
|
61
|
+
## Upload with hashtags
|
62
|
+
|
63
|
+
```python
|
64
|
+
from tiktokautouploader import upload_tiktok
|
65
|
+
|
66
|
+
video_path = 'path/to/your/video.mp4'
|
67
|
+
description = 'Check out my latest TikTok video!'
|
68
|
+
accountname = 'mytiktokaccount'
|
69
|
+
hashtags = ['#fun', '#viral']
|
70
|
+
|
71
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, hashtags=hashtags)
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+
### Upload with TikTok Sound
|
76
|
+
|
77
|
+
```python
|
78
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, sound_name='trending_sound', sound_aud_vol='main')
|
79
|
+
```
|
80
|
+
|
81
|
+
PLEASE READ DOCUMENTATION FOR MORE INFO.
|
82
|
+
|
83
|
+
### Schedule an Upload
|
84
|
+
|
85
|
+
```python
|
86
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, schedule='03:10', day=11)
|
87
|
+
```
|
88
|
+
|
89
|
+
PLEASE READ DOCUMENTATION FOR MORE INFO
|
90
|
+
|
91
|
+
### Perform Copyright Check Before Uploading
|
92
|
+
|
93
|
+
```python
|
94
|
+
upload_tiktok(video=video_path, description=description, accountname=accountname, hashtags=hashtags, copyrightcheck=True)
|
95
|
+
```
|
96
|
+
|
97
|
+
## 🎯 Why Choose `autotiktokuploader`?
|
98
|
+
|
99
|
+
- **No more captchas:** Fully automated uploads without interruptions, If captchas do show up, no worries, they will be solved. (read documentation for more info)
|
100
|
+
- **Maximize your reach:** Add popular sounds and effective hashtags that work to boost visibility and go viral!
|
101
|
+
- **Stay compliant:** Built-in copyright checks to avoid unforeseen takedowns.
|
102
|
+
- **Convenient scheduling:** Post at the right time, even when you're away!
|
103
|
+
- **Much faster than manually uploading:** Drastically reduce the time you need to upload videos, just click one button and be done much quicker!
|
104
|
+
- **Upload to different account:** Stay on top of all your TikTok accounts with our multi-account functionality!
|
105
|
+
|
106
|
+
## 🛠 Dependencies
|
107
|
+
|
108
|
+
This library requires the following dependencies:
|
109
|
+
|
110
|
+
- `playwright`
|
111
|
+
- `requests`
|
112
|
+
- `Pillow`
|
113
|
+
- `scikit-learn`
|
114
|
+
- `inference`
|
115
|
+
|
116
|
+
These will be automatically installed when you install the package.
|
117
|
+
|
118
|
+
## 👤 Author
|
119
|
+
|
120
|
+
Created by **Haziq**. Feel free to reach out at [haziqmk123@gmail.com](mailto:haziqmk123@gmail.com)
|
121
|
+
|
122
|
+
## 📄 License
|
123
|
+
|
124
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
|
125
|
+
|
126
|
+
## 📮 Related Projects
|
127
|
+
|
128
|
+
If you liked this project please check out my use case showcase project that generates TikToks and uploads them using 'tiktokautouploader'
|
129
|
+
|
130
|
+
[TikTokGenerator](https://github.com/haziq-exe/TikTokGenerator)
|
131
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling", "setuptools", "wheel"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "tiktokautouploader"
|
7
|
+
version = "4.0"
|
8
|
+
description = "Upload or schedule videos to TikTok with viral TikTok sounds and hashtags."
|
9
|
+
readme = {file = "README.md", content-type = "text/markdown"}
|
10
|
+
keywords = ["tiktok", "autoupload", "tiktokautoupload"]
|
11
|
+
authors = [
|
12
|
+
{ name = "HAZIQ", email = "haziqmk123@gmail.com" }
|
13
|
+
]
|
14
|
+
urls = { "Homepage" = "https://github.com/haziq-exe/TikTokAutoUploader" }
|
15
|
+
classifiers = [
|
16
|
+
"Programming Language :: Python :: 3",
|
17
|
+
"Programming Language :: Python :: 3.8",
|
18
|
+
"Programming Language :: Python :: 3.9",
|
19
|
+
"Programming Language :: Python :: 3.10",
|
20
|
+
"Programming Language :: Python :: 3.11",
|
21
|
+
"License :: OSI Approved :: MIT License",
|
22
|
+
"Operating System :: OS Independent",
|
23
|
+
]
|
24
|
+
python-requires = ">=3.6"
|
25
|
+
|
26
|
+
dependencies = [
|
27
|
+
"playwright>=1.0.0",
|
28
|
+
"requests>=2.0.0",
|
29
|
+
"Pillow>=8.0.0",
|
30
|
+
"inference>=0.18.1",
|
31
|
+
]
|
32
|
+
|
33
|
+
[tool.hatch.build]
|
34
|
+
tags = ["wheel"]
|
35
|
+
|
36
|
+
[tool.hatch.metadata]
|
37
|
+
name = "tiktokautouploader"
|
38
|
+
version = "4.0"
|
39
|
+
description = "Upload or schedule videos to TikTok with TikTok sounds and hashtags that work."
|
40
|
+
readme = {file = "README.md", content-type = "text/markdown"}
|
41
|
+
keywords = ["tiktok", "autoupload", "tiktokautoupload"]
|
42
|
+
authors = [
|
43
|
+
{ name = "HAZIQ", email = "haziqmk123@gmail.com" }
|
44
|
+
]
|
45
|
+
urls = { "Homepage" = "https://github.com/haziq-exe/TikTokAutoUploader" }
|
46
|
+
classifiers = [
|
47
|
+
"Programming Language :: Python :: 3",
|
48
|
+
"Programming Language :: Python :: 3.8",
|
49
|
+
"Programming Language :: Python :: 3.9",
|
50
|
+
"Programming Language :: Python :: 3.10",
|
51
|
+
"Programming Language :: Python :: 3.11",
|
52
|
+
"License :: OSI Approved :: MIT License",
|
53
|
+
"Operating System :: OS Independent",
|
54
|
+
]
|
55
|
+
python_requires = ">=3.6"
|
56
|
+
|
57
|
+
[tool.hatch.envs]
|
58
|
+
packages = ["autotiktokuploader"]
|
59
|
+
include = ["autotiktokuploader/__init__.py", "autotiktokuploader/function.py", "autotiktokuploader/Js_assets/login.js"]
|
60
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
const { chromium } = require('playwright-extra')
|
2
|
+
|
3
|
+
|
4
|
+
const stealth = require('puppeteer-extra-plugin-stealth')()
|
5
|
+
|
6
|
+
chromium.use(stealth)
|
7
|
+
|
8
|
+
|
9
|
+
function sleep(time) {
|
10
|
+
return new Promise(resolve => setTimeout(resolve, time));
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
async function checkForRedirect(page) {
|
15
|
+
const currentUrl = page.url();
|
16
|
+
const pattern = /^https:\/\/www\.tiktok\.com\/foryou/;
|
17
|
+
return pattern.test(currentUrl);
|
18
|
+
}
|
19
|
+
|
20
|
+
(async () => {
|
21
|
+
let redirected = false;
|
22
|
+
const browser = await chromium.launch({ headless: false });
|
23
|
+
const page = await browser.newPage();
|
24
|
+
await page.goto('https://www.tiktok.com/login');
|
25
|
+
|
26
|
+
while (!redirected) {
|
27
|
+
redirected = await checkForRedirect(page);
|
28
|
+
if (!redirected) {
|
29
|
+
await sleep(1000);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
sleep(2000)
|
34
|
+
const cookies = await page.context().cookies();
|
35
|
+
const fs = require('fs');
|
36
|
+
fs.writeFileSync('TK_cookies.json', JSON.stringify(cookies, null, 2));
|
37
|
+
|
38
|
+
|
39
|
+
await browser.close();
|
40
|
+
})();
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "tiktokautouploader-assets",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"scripts": {
|
5
|
+
"postinstall": "npx playwright install chromium"
|
6
|
+
},
|
7
|
+
"dependencies": {
|
8
|
+
"playwright": "^1.48.2",
|
9
|
+
"playwright-extra": "^4.3.6",
|
10
|
+
"puppeteer-extra-plugin-stealth": "^2.11.2"
|
11
|
+
}
|
12
|
+
}
|