forked from yiefrbt/tiktoktools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtiktools.py
210 lines (150 loc) · 5.77 KB
/
tiktools.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
from selenium import webdriver
from os import system, name
from time import time, strftime, gmtime, sleep
import pyfiglet, os, threading
def clear():
if name == 'nt':
_ = system('cls')
else:
_ = system('clear')
clear()
system('title TIKTOD V3')
print(pyfiglet.figlet_format("TIKTOOLS", font="slant"))
print("FOLLOW INSTAGRAM : @yiefrbt\n")
print("1. Views bot\n2. Like bot\n3. Followers bot\n4. Me\n")
auto = int(input("Pilih: "))
if auto == 1 or auto == 2 or auto == 3:
vidUrl = input("TikTok video URL: ")
start = time()
time_elapsed = strftime('%H:%M:%S', gmtime(time() - start))
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--mute-audio")
chrome_options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(r"chromedriver.exe", options=chrome_options)
driver.set_window_size(1024, 650)
Views = 0
Hearts = 0
Followers = 0
def beautify(arg):
return format(arg, ',d').replace(',', '.')
def title1(): # Update the title IF option 1 was picked.
global Views
while True:
time_elapsed = strftime('%H:%M:%S', gmtime(time() - start))
system(f'title TIKTOD V3 ^| Views Sent: {beautify(Views)} ^| Elapsed Time: {time_elapsed}')
def title2(): # Update the title IF option 2 was picked.
global Hearts
while True:
time_elapsed = strftime('%H:%M:%S', gmtime(time() - start))
system(f'title TIKTOD V3 ^| Hearts Sent: {beautify(Hearts)} ^| Elapsed Time: {time_elapsed}')
def title3(): # Update the title IF option 3 was picked.
global Followers
while True:
time_elapsed = strftime('%H:%M:%S', gmtime(time() - start))
system(f'title TIKTOD V3 ^| Followers Sent: {beautify(Followers)} ^| Elapsed Time: {time_elapsed}')
def loop1():
global Views
sleep(10)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[4]/div/button").click()
except:
print("[-] The captcha is unsolved!")
driver.refresh()
loop1()
try:
sleep(2)
driver.find_element_by_xpath("//*[@id=\"sid4\"]/div/div/div/form/div/input").send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath("//*[@id=\"sid4\"]/div/div/div/form/div/div/button").click()
sleep(5)
driver.find_element_by_xpath("//*[@id=\"c2VuZC9mb2xsb3dlcnNfdGlrdG9V\"]/div[1]/div/form/button").click()
driver.refresh()
Views += 500
print("[+] Views sended!")
sleep(120)
loop1()
except:
print("[-] An error occured. Retrying..")
driver.refresh()
loop1()
def loop2():
global Hearts
sleep(10)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[2]/div/button").click()
except:
print("[-] The captcha is unsolved!")
driver.refresh()
loop2()
try:
sleep(2)
driver.find_element_by_xpath('//*[@id="sid2"]/div/div/div/form/div/input').send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath('//*[@id="sid2"]/div/div/div/form/div/div/button').click()
sleep(5)
driver.find_element_by_xpath('//*[@id="c2VuZE9nb2xsb3dlcnNfdGlrdG9r"]/div[1]/div/form/button').click()
sleep(6)
hearts = driver.find_element_by_xpath('//*[@id="c2VuZE9nb2xsb3dlcnNfdGlrdG9r"]/span').text.split()
Hearts += int(hearts[0])
print("[+] Hearts sended!")
sleep(5)
driver.refresh()
sleep(640)
loop2()
except:
print("[-] An error occured. Retrying..")
driver.refresh()
loop2()
def loop3():
global Followers
sleep(10)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[1]/div/button").click()
except:
print("[-] The captcha is unsolved!")
driver.refresh()
loop3()
try:
sleep(2)
driver.find_element_by_xpath('//*[@id="sid"]/div/div/div/form/div/input').send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath('//*[@id="sid"]/div/div/div/form/div/div/button').click()
sleep(5)
driver.find_element_by_xpath().click('//*[@id="c2VuZF9mb2xsb3dlcnNfdGlrdG9r"]/div[1]/div/form/button')
sleep(6)
folls = driver.find_element_by_xpath('//*[@id="c2VuZF9mb2xsb3dlcnNfdGlrdG9r"]/span').text.split()
Followers += int(folls[0])
print("[+] Followers sended!")
driver.refresh()
sleep(310)
loop3()
except:
print("[-] An error occured. Retrying..")
driver.refresh()
loop3()
clear()
print(pyfiglet.figlet_format("KONTOL", font="slant"))
print("Log:")
if auto == 1:
driver.get("https://ketuy.com/")
a = threading.Thread(target=title1)
b = threading.Thread(target=loop1)
a.start()
b.start()
elif auto == 2:
driver.get("https://ketuy.com/")
a = threading.Thread(target=title2)
b = threading.Thread(target=loop2)
a.start()
b.start()
elif auto == 3:
driver.get("https://ketuy.com/")
a = threading.Thread(target=title3)
b = threading.Thread(target=loop3)
a.start()
b.start()
elif auto == 4:
print("⚠︎ Follow me on Instagram @yiefrbt")
print(" THANKS !! ")
else:
print(f"{auto} is not a valid option. Please pick 1, 2, 3, or 4")