-
Notifications
You must be signed in to change notification settings - Fork 8
/
better_tiktok.py
192 lines (176 loc) · 6.4 KB
/
better_tiktok.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
import undetected_chromedriver.v2 as uc
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import pyfiglet
from time import sleep
from os import system
vidUrl = input("Video Link: ")
def loop1():
global i
sleep(30)
try:
driver.find_element_by_xpath("//*[@id=\"main\"]/div/div[4]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.maximize_window()
driver.refresh()
loop1()
try:
driver.minimize_window()
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(2)
driver.find_element_by_xpath("//*[@id=\"c2VuZC9mb2xsb3dlcnNfdGlrdG9V\"]/div[1]/div/form/button").click()
sleep(10)
driver.refresh()
i += 1
total = i * 1000
system("cls")
print("Views success delivered! Total", total,"views")
sleep(30)
loop1()
except:
driver.refresh()
sleep(20)
loop1()
def loop2():
sleep(10)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[2]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.maximize_window()
driver.refresh()
loop2()
try:
driver.minimize_window()
sleep(2)
driver.find_element_by_xpath("/html/body/div[4]/div[3]/div/div/div/form/div/input").send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath("/html/body/div[4]/div[3]/div/div/div/form/div/div/button").click()
sleep(10)
driver.find_element_by_xpath("/html/body/div[4]/div[3]/div/div/div/div/div[1]/div/form/button").click()
sleep(10)
hearts = driver.find_element_by_xpath('//*[@id="c2VuZE9nb2xsb3dlcnNfdGlrdG9r"]/span').text
sleep(55)
print(hearts," Success delivered! Thank me with a $ 1 donation on GitHub")
sleep(100)
driver.refresh()
sleep(200)
loop2()
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(355)
loop2()
def loop3():
sleep(10)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[3]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.maximize_window()
driver.refresh()
loop2()
try:
driver.minimize_window()
sleep(2)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/form/div/input").send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/form/div/div/button").click()
sleep(5)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/div/div[1]/div/form/button").click()
sleep(5)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/div/form/ul/li/div/button").click()
sleep(47)
driver.refresh()
print("Success delivered! Thank me with a $ 1 donation on GitHub")
loop3()
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(50)
loop3()
def loop4():
sleep(20)
wait_time = 660 #11 minutes
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[1]/div/button").click() #Followers
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.maximize_window()
driver.refresh()
loop4()
try:
driver.minimize_window()
sleep(20)
driver.find_element_by_xpath("/html/body/div[4]/div[2]/div/div/div/form/div/input").send_keys(vidUrl) #Write
sleep(2)
driver.find_element_by_xpath("//*[@id=\"sid\"]/div/div/div/form/div/div/button").click() #Search
sleep(20)
driver.find_element_by_xpath("//*[@id=\"c2VuZF9mb2xsb3dlcnNfdGlrdG9r\"]/div[1]/div/form/button").click() #AddFollowers
sleep(wait_time/3)
print("Success delivered!")
sleep(wait_time/3)
driver.refresh()
sleep(wait_time/3)
loop4()
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(wait_time)
loop4()
def loop5():
sleep(20)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[5]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.maximize_window()
driver.refresh()
loop5()
try:
driver.minimize_window()
sleep(20)
driver.find_element_by_xpath("/html/body/div[4]/div[6]/div/div/div/form/div/input").send_keys(vidUrl) # Write
sleep(2)
driver.find_element_by_xpath("/html/body/div[4]/div[6]/div/div/div/form/div/div/button").click() # Search
sleep(20)
driver.find_element_by_xpath("/html/body/div[4]/div[6]/div/div/div/div/div[1]/div/form/button").click() # AddShares
sleep(60)
print("Shares sent! ")
sleep(1700)
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(300)
loop5()
def loop6():
sleep(1000)
driver.refresh()
print("Reload")
loop5()
bot = int(input("What do you want to do?\n1 - Auto views(1000)\n2 - Auto hearts\n3 - Auto (FIRST) comments heart\n4 - Auto followers\n5 - [NEW]Auto Share\n6 - Simple reload\n"))
i = 0
chrome_options = webdriver.ChromeOptions()
#chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
driver = uc.Chrome(chrome_options=chrome_options)
driver.get("https://vipto.de/")
if bot == 1:
loop1()
elif bot == 2:
loop2()
elif bot == 3:
loop3()
elif bot == 4:
loop4()
elif bot == 5:
loop5()
elif bot == 6:
loop5()
else:
print("You can insert just 1, 2, 3, 4, 5 or 6")