-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
562 lines (493 loc) · 25.1 KB
/
bot.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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
import requests
import json
import random
import os
import urllib.parse
from core.helper import get_headers, countdown_timer, extract_user_data, config
from colorama import *
import random
from datetime import datetime
import time
import pytz
class PitchTalk:
def __init__(self) -> None:
self.session = requests.Session()
self.slugs = ['share-x', 'share-tiktok']
self.current_slug_index = 0
def clear_terminal(self):
os.system('cls' if os.name == 'nt' else 'clear')
def log(self, message):
print(
f"{Fore.CYAN + Style.BRIGHT}[ {datetime.now().strftime('%x %X %Z')} ]{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} | {Style.RESET_ALL}{message}",
flush=True
)
def welcome(self):
banner = f"""{Fore.GREEN}
██████ ██ ██ ██████ ██ ██ ███ ███ ██████ ███████ ██████
██ ██ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ████ ██ ██████ █████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██████ ██████ ██████ ██ ██ ██████ ███████ ██ ██
"""
print(Fore.GREEN + Style.BRIGHT + banner + Style.RESET_ALL)
print(Fore.GREEN + f" PitchTalk Bot")
print(Fore.RED + f" FREE TO USE = Join us on {Fore.GREEN}t.me/cucumber_scripts")
print(Fore.YELLOW + f" before start please '{Fore.GREEN}git pull{Fore.YELLOW}' to update bot")
print(f"{Fore.WHITE}~" * 60)
def format_seconds(self, seconds):
hours, remainder = divmod(seconds, 3600)
minutes, seconds = divmod(remainder, 60)
return f"{int(hours):02}:{int(minutes):02}:{int(seconds):02}"
def load_data(self, query: str):
query_params = urllib.parse.parse_qs(query)
query = query_params.get('user', [None])[0]
if query:
user_data_json = urllib.parse.unquote(query)
user_data = json.loads(user_data_json)
user_id = str(user_data['id'])
username = str(user_data['username'])
return user_id, username
else:
raise ValueError("User data not found in query.")
def auth(self, query: str, user_id: str, username: str):
url = 'https://api.pitchtalk.app/v1/api/auth'
data = json.dumps({
'hash': query,
'photoUrl': '',
'referralCode': '3dbacc',
'telegramId': user_id,
'username': username
})
self.headers.update({
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.post(url, headers=self.headers, data=data)
if response.status_code == 201:
return response.json()
else:
return None
def claim_refferal(self, token: str, query: str):
url = 'https://api.pitchtalk.app/v1/api/users/claim-referral'
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.post(url, headers=self.headers)
if response.status_code == 201:
return response.json()
else:
return None
def farmings(self, token: str, query: str):
url = 'https://api.pitchtalk.app/v1/api/farmings'
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.get(url, headers=self.headers)
if response.status_code != 200 or not response.text.strip():
return None
try:
return response.json()
except json.JSONDecodeError as e:
self.log(f"[ JSON Error ]: {e}")
return None
def create_farming(self, token: str, query: str):
url = 'https://api.pitchtalk.app/v1/api/users/create-farming'
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.post(url, headers=self.headers)
if response.status_code == 201:
return response.json()
else:
return None
def claim_farming(self, token: str, query: str):
url = 'https://api.pitchtalk.app/v1/api/users/claim-farming'
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.post(url, headers=self.headers)
if response.status_code == 201:
return response.json()
else:
return None
def tasks(self, token: str, query: str):
url = 'https://api.pitchtalk.app/v1/api/tasks'
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.get(url, headers=self.headers)
if response.status_code == 200:
return response.json()
else:
return []
def start_tasks(self, token: str, query: str, task_id: str):
url = f'https://api.pitchtalk.app/v1/api/tasks/{task_id}/start'
data = {}
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.post(url, headers=self.headers, json=data)
if response.status_code == 201:
return response.json()
else:
return {}
def verify_tasks(self, token: str, query: str):
url = 'https://api.pitchtalk.app/v1/api/tasks/verify'
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.get(url, headers=self.headers)
if response.status_code == 200:
return response.json()
else:
return []
def generate_post_link(self, slug):
randomNick = ''.join(random.choices('abcdefghijklmnopqrstuvwxyz', k=8))
randomId = str(random.randint(100000, 999999))
if slug == 'share-x':
return f"https://x.com/{randomNick}/status/{randomId}"
elif slug == 'share-tiktok':
return f"https://www.tiktok.com/@{randomNick}/video/{randomId}?is_from_webapp=1&sender_device=pc"
def get_next_slug(self):
slug = self.slugs[self.current_slug_index]
self.current_slug_index = (self.current_slug_index + 1) % len(self.slugs)
return slug
def daily_tasks(self, token: str, query: str, slug: str, post_link: str):
url = 'https://api.pitchtalk.app/v1/api/tasks/create-daily'
data = json.dumps({'slug': slug, 'proof': post_link})
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.post(url, headers=self.headers, data=data)
if response.status_code == 201:
return response.json()
else:
return None
def upgrade_level(self, token: str, query: str):
url = 'https://api.pitchtalk.app/v1/api/users/upgrade'
self.headers.update({
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json',
'X-Telegram-Hash': query
})
response = self.session.post(url, headers=self.headers)
if response.status_code == 201:
return response.json()
else:
return response.json()
def set_proxy(self, proxy):
self.session.proxies = {
"http": proxy,
"https": proxy,
}
if '@' in proxy:
host_port = proxy.split('@')[-1]
else:
host_port = proxy.split('//')[-1]
return host_port
def question(self):
# while True:
# submit_daily = input("Submitted Daily Tasks? [y/n] -> ").strip().lower()
# if submit_daily in ["y", "n"]:
# submit_daily = submit_daily == "y"
# break
# else:
# print(
# f"{Fore.RED + Style.BRIGHT}Invalid Input.{Fore.WHITE + Style.BRIGHT} Choose 'y' to submit or 'n' to skip.{Style.RESET_ALL}")
while True:
up = config['update_lvl']
if up:
upgarde = 'y'
else:
upgarde = 'n'
if upgarde in ["y", "n"]:
upgarde = upgarde == "y"
break
else:
print(
f"{Fore.RED + Style.BRIGHT}Invalid Input.{Fore.WHITE + Style.BRIGHT} Choose 'y' to upgrade or 'n' to skip.{Style.RESET_ALL}")
return upgarde
def process_query(self, query, submit_daily: bool, upgrade: bool):
user_id, username = self.load_data(query)
account = self.auth(query, user_id, username)
token = account['accessToken']
if not token:
self.log(
f"{Fore.RED + Style.BRIGHT}[ Token Not Found:{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} Account {username} {Style.RESET_ALL}"
f"{Fore.RED + Style.BRIGHT}]{Style.RESET_ALL}"
)
return
if account:
user = account['user']
if user:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Account{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {username} {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Balance{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {user['coins']} Points {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Ticket{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {user['tickets']} {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
time.sleep(1)
daily_reward = account['dailyRewards']
if daily_reward['isNewDay'] and daily_reward:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Daily Login{Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT} Is Claimed {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Reward{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {daily_reward['coins']} Points {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {daily_reward['tickets']} Tickets {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Streak{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {daily_reward['loginStreak']} Day {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Daily Login{Style.RESET_ALL}"
f"{Fore.YELLOW + Style.BRIGHT} Is Already Claimed {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Streak{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {daily_reward['loginStreak']} Day {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
time.sleep(1)
refferal = user['referralRewards']
if refferal != 0:
claim = self.claim_refferal(token, query)
if claim:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Refferal{Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT} Is Claimed {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Reward{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {user['referralRewards']} Points {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Refferal{Style.RESET_ALL}"
f"{Fore.RED + Style.BRIGHT} Isn't Claimed {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Refferal{Style.RESET_ALL}"
f"{Fore.YELLOW + Style.BRIGHT} No Available Points to Claim {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
time.sleep(1)
farm = self.farmings(token, query)
if not farm:
create = self.create_farming(token, query)
end_farm = create['farming']['endTime']
end_farm_utc = datetime.strptime(end_farm, '%Y-%m-%dT%H:%M:%S.%fZ')
end_farm_wib = pytz.utc.localize(end_farm_utc).strftime('%x %X %Z')
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Farming{Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT} Is Started {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Next Claim at{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {end_farm_wib} {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
farm = self.farmings(token, query)
time.sleep(1)
if farm:
end_farm = farm['endTime']
end_farm_utc = datetime.strptime(end_farm, '%Y-%m-%dT%H:%M:%S.%fZ')
end_farm_wib = pytz.utc.localize(end_farm_utc).strftime('%x %X %Z')
claim = self.claim_farming(token, query)
if claim:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Farming{Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT} Is Claimed {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Balance Now{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {claim['coins']} Points {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Farming{Style.RESET_ALL}"
f"{Fore.YELLOW + Style.BRIGHT} Not Time to Claim {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Next Claim at{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {end_farm_wib} {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
time.sleep(1)
tasks = self.tasks(token, query)
if tasks:
for task in tasks:
if task and task.get('completedAt') is None:
task_id = task['id']
title = task['template']['title']
reward_coin = task['template']['rewardCoins']
reward_ticket = task['template']['rewardTickets']
slug = task['template']['slug']
if slug in ["share-x", "share-tiktok"]:
continue
start = self.start_tasks(token, query, task_id)
if start and start.get('status') == 'VERIFY_REQUESTED':
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ General Task{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {title} {Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT}Is Started{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ General Task{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {title} {Style.RESET_ALL}"
f"{Fore.RED + Style.BRIGHT}Isn't Started{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ]{Style.RESET_ALL}"
)
verified = self.verify_tasks(token, query)
for verify in verified:
if verify and verify.get('status') == 'COMPLETED_CLAIMED':
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ General Task{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {title} {Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT}Is Verified{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ] [ Reward{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {reward_coin} Points {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}-{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {reward_ticket} Tickets {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ General Task{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {title} {Style.RESET_ALL}"
f"{Fore.RED + Style.BRIGHT}Isn't Verified{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ General Task{Style.RESET_ALL}"
f"{Fore.RED + Style.BRIGHT} Is None {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
if submit_daily:
for _ in range(2):
slug = self.get_next_slug()
post_link = self.generate_post_link(slug)
create_daily = self.daily_tasks(token, query, slug, post_link)
if create_daily:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Daily Task{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {slug.upper()} {Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT}Is Submitted{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ] [ Balance {Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT}-750 Points{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Daily Task{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {slug.upper()} {Style.RESET_ALL}"
f"{Fore.YELLOW + Style.BRIGHT}Is Already Submitted{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Daily Task{Style.RESET_ALL}"
f"{Fore.YELLOW + Style.BRIGHT} Skipped {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
if upgrade:
upgrade_level = self.upgrade_level(token, query)
if isinstance(upgrade_level, dict) and 'message' in upgrade_level:
error_message = upgrade_level['message']
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Upgrade{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} Level {user['level'] + 1} {Style.RESET_ALL}"
f"{Fore.RED + Style.BRIGHT}Isn't Success{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}] [ Reason{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} {error_message} {Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT}]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Upgrade{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} Level {user['level'] + 1} {Style.RESET_ALL}"
f"{Fore.GREEN + Style.BRIGHT}Is Success{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ]{Style.RESET_ALL}"
)
else:
self.log(
f"{Fore.MAGENTA + Style.BRIGHT}[ Upgrade{Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT} Level {user['level'] + 1} {Style.RESET_ALL}"
f"{Fore.YELLOW + Style.BRIGHT}Skipped{Style.RESET_ALL}"
f"{Fore.MAGENTA + Style.BRIGHT} ]{Style.RESET_ALL}"
)
def main(self):
try:
with open('query.txt', 'r') as file:
queries = [line.strip() for line in file if line.strip()]
with open('proxies.txt', 'r') as file:
proxies = [line.strip() for line in file if line.strip()]
# submit_daily = self.question()
submit_daily = False
upgrade = self.question()
while True:
self.log(
f"{Fore.GREEN + Style.BRIGHT}Account's Total: {Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT}{len(queries)}{Style.RESET_ALL}"
)
self.log(
f"{Fore.GREEN + Style.BRIGHT}Proxy's Total: {Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT}{len(proxies)}{Style.RESET_ALL}"
)
self.log(f"{Fore.CYAN + Style.BRIGHT}-{Style.RESET_ALL}"*75)
for i, query in enumerate(queries):
query = query.strip()
if query:
self.log(
f"{Fore.GREEN + Style.BRIGHT}Account: {Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT}{i + 1} / {len(queries)}{Style.RESET_ALL}"
)
if len(proxies) >= len(queries):
proxy = self.set_proxy(proxies[i]) # Set proxy for each account
self.log(
f"{Fore.GREEN + Style.BRIGHT}Use proxy: {Style.RESET_ALL}"
f"{Fore.WHITE + Style.BRIGHT}{proxy}{Style.RESET_ALL}"
)
else:
self.log(Fore.RED + "Number of proxies is less than the number of accounts. Proxies are not used!")
user_info = extract_user_data(query)
user_id = str(user_info.get('id'))
self.headers = get_headers(user_id)
try:
self.process_query(query, submit_daily, upgrade)
except Exception as e:
self.log(f"{Fore.RED + Style.BRIGHT}An error process_query: {e}{Style.RESET_ALL}")
self.log(f"{Fore.CYAN + Style.BRIGHT}-{Style.RESET_ALL}"*75)
account_delay = config['account_delay']
countdown_timer(random.randint(min(account_delay), max(account_delay)))
cycle_delay = config['cycle_delay']
countdown_timer(random.randint(min(cycle_delay), max(cycle_delay)))
except KeyboardInterrupt:
self.log(f"{Fore.RED + Style.BRIGHT}[ EXIT ] Pitch Talk - BOT{Style.RESET_ALL}")
except Exception as e:
self.log(f"{Fore.RED + Style.BRIGHT}An error occurred: {e}{Style.RESET_ALL}")
if __name__ == "__main__":
run = PitchTalk()
run.clear_terminal()
run.welcome()
run.main()