-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
162 lines (144 loc) · 6.97 KB
/
main.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
import os
import pyfiglet
import webbrowser
from time import sleep
from os import system, name
from selenium import webdriver, common
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--disable-notifications")
chrome_options.add_argument("--mute-audio")
chrome_options.add_experimental_option('excludeSwitches', ['enable-logging'])
client_version = "1.2.1"
def beautify(arg):
return format(arg, ',d').replace(',', '.')
system(f'title TIBOT {client_version}')
def viewbot():
captcha = False
views_count = 0
cycle_count = 0
total_views = 0
new_views = 0
VIDEO_URL = input("[>] TikTok video URL: ")
driver = webdriver.Chrome(options=chrome_options)
driver.set_window_size(800, 800)
driver.get('https://vipto.de/')
print('[!] Solve the captcha')
captcha = True
while captcha:
# Waits for the captcha to be completed and attempts to find the proper button.
try:
driver.find_element(By.XPATH,'/html/body/div[6]/div/div[2]/div/div/div[6]/div/button').click()
except (common.exceptions.NoSuchElementException, common.exceptions.ElementClickInterceptedException):
continue
driver.set_window_position(-10000, 0)
print('[!] TIBOT is running')
captcha = False
# Pastes the URL into the "Enter video URL" textbox.
try:
driver.find_element(By.XPATH,'/html/body/div[10]/div/form/div/input').send_keys(VIDEO_URL)
except (common.exceptions.ElementNotInteractableException):
print('[!] Followbot is not available at the moment, try something else')
driver.quit()
runbot()
while True:
# Clicks the "Search" button.
driver.find_element(By.XPATH, '/html/body/div[10]/div/form/div/div/button').click()
sleep(3)
if views_count>0:
try:
print('[!] Cycle completed, generating metrics')
new_views = views_count
views_count = driver.find_element(By.XPATH,'/html/body/div[10]/div/div/div[1]/div/form/button').text
views_count = int(views_count.replace(',',''))
new_views = views_count - new_views
total_views = total_views + new_views
print(f'[!] Views counter: {views_count:,} (+{new_views:,} new views, total: +{total_views:,})')
except:
print('[!] Unrecognized error, retrying')
continue
else:
try:
views_count = driver.find_element(By.XPATH,'/html/body/div[10]/div/div/div[1]/div/form/button').text
views_count = int(views_count.replace(',',''))
print(f'[!] Views counter: {views_count:,}')
except common.exceptions.NoSuchElementException:
try:
if driver.find_element(By.XPATH,'/html/body/div[4]/div[5]/div/div/span').text:
driver.quit()
print(f'\n[!] Invalid URL, please try again')
viewbot()
break
except common.exceptions.NoSuchElementException:
try:
print('[!] Cooldown is still active')
thedelay = driver.find_element(By.XPATH,'/html/body/div[10]/div/div/span[1]').text
minutes = int(thedelay[12:-43])
seconds = int(thedelay[24:-30])
cooldown = minutes* 60 + seconds
thedelay = str(thedelay[:-22])
print('[!] '+thedelay+' for the next cycle')
except ValueError:
print('[!] Unrecognized error, retrying')
continue
while cooldown > 0:
cooldown -= 1
os.system(f'title [TIBOT] - Views Count: {beautify(views_count)} ^| Boosted: +{total_views:,} ^| Cycles: {cycle_count} ^| Please wait 'f'{cooldown}seconds')
sleep(1)
os.system(f'title [TIBOT] - Views Count: {beautify(views_count)} ^| Boosted: +{total_views:,} ^| Cycles: {cycle_count} ^| Starting a new cycle')
continue
try:
# Clicks the "Send Views" button.
sleep(2)
driver.find_element(By.XPATH,'/html/body/div[10]/div/div/div[1]/div/form/button').send_keys(Keys.TAB)
driver.find_element(By.XPATH,'/html/body/div[10]/div/div/div[1]/div/form/button').send_keys(Keys.ENTER)
sleep(2)
except common.exceptions.NoSuchElementException:
driver.quit()
print(f'\n[!] Invalid URL, please try again')
viewbot()
break
else:
try:
print(f'\n[+] New views cycle submitted')
cycle_count += 1
os.system(f'title [TIBOT] - Views Count: {beautify(views_count)} ^| Total boosted: +{total_views:,} ^| Cycles: {cycle_count}')
sleep(5)
thedelay = driver.find_element(By.XPATH,'/html/body/div[10]/div/div/span[1]').text
minutes = int(thedelay[12:-43])
seconds = int(thedelay[24:-30])
cooldown = minutes* 60 + seconds
thedelay = str(thedelay[:-22])
print('[!] '+thedelay+' for the next cycle')
except ValueError:
print('[!] Unrecognized error, retrying')
continue
while cooldown > 0:
cooldown -= 1
os.system(f'title [TIBOT] - Views Count: {beautify(views_count)} ^| Boosted: +{total_views:,} ^| Cycles: {cycle_count} ^| Please wait 'f' {cooldown} seconds')
sleep(1)
os.system(f'title [TIBOT] - Views Count: {beautify(views_count)} ^| Boosted: +{total_views:,} ^| Cycles: {cycle_count} ^| Starting a new cycle')
def runbot():
CHOICE = int(input("[>] Select choice: "))
if CHOICE == 1:
viewbot()
if CHOICE == 2 or CHOICE == 3 or CHOICE == 4 or CHOICE == 5:
print('\n[!] Currently unavailable, please check for updates or try again')
UPDATE = input("[>] Would you like to check for updates? Y/N: ")
if UPDATE == "Y":
webbrowser.open('https://github.com/goldieczr/TIBOT/releases', new=0, autoraise=True)
print(f'[!] URL opened, current version: v{client_version}\n')
runbot()
if UPDATE == "N":
print('')
runbot()
else:
print("[!] Invalid choice, returning to menu")
runbot()
else:
print('\n[!] Incorrect choice, please try again')
runbot()
print(pyfiglet.figlet_format(f"TIBOT {client_version}", font="slant"))
print("[1]. Views\n[2]. Likes | UNAVAILABLE\n[3]. Shares | UNAVAILABLE\n[4]. Followers | UNAVAILABLE\n[5]. Comment Likes | UNAVAILABLE\n[6]. Livestream [VS+ Likes] | UNAVAILABLE\n")
runbot()