-
Notifications
You must be signed in to change notification settings - Fork 38
/
main.py
257 lines (191 loc) · 12 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
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
import datetime
import random
import time
import inquirer
from colorama import init, Fore
from src import process
from prettytable import PrettyTable
def main():
init(autoreset=True)
inject = process.ZefoyViews()
inject.get_session_captcha()
print(Fore.GREEN + """
_____ _ _ __ ___
|_ _(_) |_\ \ / (_)_____ __ _____
| | | | / /\ V /| / -_) V V (_-<
|_| |_|_\_\ \_/ |_\___|\_/\_//__/
make with ❤️️ by @sandroputraa
""")
print(Fore.LIGHTYELLOW_EX + "Example: https://www.tiktok.com/@awokwokwokwkokwow/video/6865609642974743810")
url_video = input("Enter URL Video: ")
if url_video == "":
url_video = "https://www.tiktok.com/@awokwokwokwkokwow/video/6865609642974743810"
time.sleep(1)
if inject.post_solve_captcha(captcha_result=inject.captcha_solver()):
print("\n[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Success Solve Captcha" + "\n")
table = PrettyTable(field_names=["Services", "Status"], title="Status Services", header_style="upper",
border=True)
status_services = inject.get_status_services()
if not status_services: print("Failed to get status services, try again later"); exit()
valid_services = []
for service in status_services:
if service['name'] == 'Followers' or service['name'] == 'Comments Hearts':
continue
elif 'ago updated' in service['status']:
valid_services.append(service['name'])
table.add_row([service['name'], Fore.GREEN + service['status'] + Fore.RESET if 'ago updated' in service[
'status'] else Fore.RED + service['status'] + Fore.RESET])
table.title = Fore.YELLOW + " Total Online Services: " + str(len(valid_services)) + Fore.RESET
print(table)
questions = [
inquirer.List('type', message="What services do you need?", choices=valid_services, carousel=True, ), ]
answers = inquirer.prompt(questions)
while True:
try:
if answers['type'] == 'Views':
while True:
inject_views = inject.send_multi_services(url_video=url_video, services=answers['type'], )
if inject_views:
if inject_views['message'] == "Please try again later":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_views[
'message'])
exit()
elif inject_views['message'] == 'Another State':
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Views: " +
inject_views['data'], end="\r")
elif inject_views['message'] == "Successfully views sent.":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_views[
'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + url_video + ", " + Fore.LIGHTGREEN_EX + "Current Views: " +
inject_views['data'], end="\n\n")
print()
elif inject_views['message'] == "Session Expired. Please Re Login!":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_views[
'message'])
exit()
elif inject_views['message'] == "Video not found.":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_views[
'message'])
exit()
else:
for i in range(int(inject_views['message']), 0, -1):
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
i) + " seconds to send views again.", end="\r")
time.sleep(1)
time.sleep(random.randint(1, 5))
else:
pass
elif answers['type'] == 'Shares':
while True:
inject_shares = inject.send_multi_services(url_video=url_video, services=answers['type'], )
if inject_shares:
if inject_shares['message'] == "Please try again later":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_shares[
'message'])
exit()
elif inject_shares['message'] == 'Another State':
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Shares : " +
inject_shares['data'], end="\n\n")
print()
elif inject_shares['message'] == "Shares successfully sent.":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_shares[
'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + Fore.LIGHTGREEN_EX + "Current Shares: " +
inject_shares['data'], end="\r")
elif inject_shares['message'] == "Session Expired. Please Re Login!":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_shares[
'message'])
exit()
elif inject_shares['message'] == "Video not found.":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_shares[
'message'])
exit()
else:
for i in range(int(inject_shares['message']), 0, -1):
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
i) + " seconds to send Shares again.", end="\r")
time.sleep(1)
time.sleep(random.randint(1, 5))
else:
pass
elif answers['type'] == 'Favorites':
while True:
inject_favorites = inject.send_multi_services(url_video=url_video, services=answers['type'], )
if inject_favorites:
if inject_favorites['message'] == "Please try again later":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_favorites[
'message'])
exit()
elif inject_favorites['message'] == 'Another State':
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Favorites : " +
inject_favorites['data'], end="\r")
elif inject_favorites['message'] == "Favorites successfully sent.":
print(
"[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_favorites[
'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + url_video + Fore.LIGHTGREEN_EX + "Current Favorites : " +
inject_favorites['data'], end="\n\n")
print()
elif inject_favorites['message'] == "Session Expired. Please Re Login!":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_favorites[
'message'])
exit()
elif inject_favorites['message'] == "Video not found.":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_favorites[
'message'])
exit()
else:
for i in range(int(inject_favorites['message']), 0, -1):
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
i) + " seconds to send Favorites again.", end="\r")
time.sleep(1)
time.sleep(random.randint(1, 5))
else:
pass
elif answers['type'] == 'Hearts':
while True:
inject_hearts = inject.send_multi_services(url_video=url_video, services=answers['type'], )
if inject_hearts:
if inject_hearts['message'] == "Please try again later":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_hearts[
'message'])
exit()
elif inject_hearts['message'] == 'Another State':
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + "Current Hearts : " +
inject_hearts['data'], end="\r")
elif inject_hearts['message'] == "Hearts successfully sent.":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTGREEN_EX + inject_hearts[
'message'] + " to " + Fore.LIGHTYELLOW_EX + "" + url_video + Fore.LIGHTGREEN_EX + " Current Hearts: " +
inject_hearts['data'], end="\n\n")
print()
elif inject_hearts['message'] == "Session Expired. Please Re Login!":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_hearts[
'message'])
exit()
elif inject_hearts['message'] == "Video not found.":
print("[ " + str(datetime.datetime.now()) + " ] " + Fore.LIGHTRED_EX + inject_hearts[
'message'])
exit()
else:
for i in range(int(inject_hearts['message']), 0, -1):
print("[ " + str(
datetime.datetime.now()) + " ] " + Fore.LIGHTYELLOW_EX + "Please wait " + str(
i) + " seconds to send Hearts again.", end="\r")
time.sleep(1)
time.sleep(random.randint(1, 5))
else:
pass
except Exception as e:
pass
else:
print(Fore.RED + "Failed to solve captcha.")
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
print(Fore.RED + "Exit")
exit()