-
Notifications
You must be signed in to change notification settings - Fork 1
/
botstore.py
378 lines (337 loc) · 13.5 KB
/
botstore.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
import sys, os, time, getpass
from sys import platform
try:
import tkinter as tk
except Exception:
pass
if platform == "linux" or platform == "linux2":
#!/usr/bin/env python3
#/usr/bin/python3
print("Your platform is linux")
os.system("clear")
else:
pass
os.system('clear||cls')
# -*- coding: utf-8 -*-
if not sys.version_info.major==3 and sys.version_info.minor >= 6:
print("you need to upgrade your python version to up > 3.6") # Attention
if platform == "linux" or platform == "linux2":
os.system("xdg-open https://python.org/download") # If you use python < 3.6>
elif platform =="win32":
os.startfile("https://python.org/download")
else:
sys.exit(1)
sys.exit(1) # exit if you not use python > 3.6
__author__ = "Xnuvers007 / Indra Dwi A"
__version__ = "1.3.2"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2023, Xnuvers007"
__credits__ = ["Xnuvers007", "Botostore.com"]
__python__ = "3.11.0"
# tanya = str(input("Do you use termux ? (y/n) "))
# if tanya == "y" or tanya == "Y":
# os.system("pip install wheel")
# os.system("pkg install libjpeg-turbo")
# os.system('''LDFLAGS="-L/system/lib/" CFLAGS="-I/data/data/com.termux/files/usr/include/" pip install Pillow
# ''')
# elif tanya == "n" or tanya == "N":
# pass
import requests
from bs4 import BeautifulSoup
try:
from PIL import Image, ImageTk
from io import BytesIO
except Exception as e:
pass
# try:
# from PIL import Image, ImageTk
# from io import BytesIO
# import requests
# from bs4 import BeautifulSoup
# # from tqdm import tqdm
# except Exception as e:
# print(e)
# if platform == "linux" or platform == "linux2":
# ask = str(input("Do you want to install requests, beautifulsoup4, pillow ? (y/n) "))
# if ask == "y" or ask == "Y":
# user = getpass.getuser()
# username = input("apakah kamu ingin menginstallnya root atau {} [1, 2]) : ".format(user))
# if username == "root" or username == "1":
# os.system("sudo pip3 install requests beautifulsoup4 pillow") # tqdm
# elif username == user or username == "2":
# os.system("pip3 install requests beautifulsoup4 pillow") # tqdm
# else:
# print("You must write root or {} ".format(user))
# elif ask == "n" or ask == "N":
# sys.exit(1)
# else:
# print("You must write y or n")
# elif platform == "win32":
# ask = str(input("Do you want to install requests, beautifulsoup4, pillow ? (y/n) ")) # tqdm
# if ask == "y" or ask == "Y":
# os.system("pip install requests beautifulsoup4 pillow") # tqdm
# elif ask == "n" or ask == "N":
# sys.exit(1)
# else:
# print("You must write y or n")
# elif platform == "darwin":
# ask = str(input("Do you want to install requests, beautifulsoup4, pillow ? (y/n) "))
# if ask == "y" or ask == "Y":
# os.system("pip3 install requests beautifulsoup4 pillow") # tqdm
# elif ask == "n" or ask == "N":
# sys.exit(1)
# else:
# print("You must write y or n")
# else:
# print("Your platform is not supported")
# sys.exit(1)
# for i in tqdm(range(100), desc='Loading', total=100, bar_format='{l_bar}{bar}|', ncols=100, ascii=True):
# time.sleep(0.1)
url = 'https://botostore.com'
r = requests.get(url, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safar537.36 Edg/108.0.1462.54'})
print("\033[92m Tunggu Sebentar Loading Page 5 Detik \033[0m")
time.sleep(5)
os.system('clear||cls')
soup = BeautifulSoup(r.text, 'html.parser')
print("\n")
print("=====================================")
print("\033[1mTitle: Bot Store Telegram\n\033[0m")
print("\033[1m",soup.title.text.title(),"\033[0m")
for meta in soup.find_all('meta'):
if meta.get('name') == 'description':
print("Description: " + meta.get('content').title())
print("=====================================")
# get total bot added checked and online
total_bot = soup.find('div', class_='text-center').find('a').text
print("Total bot added: " + total_bot)
print("Do you Want to search bots ? or see all bots ?")
print("1. Search")
print("2. See all")
print("3. Donation")
print("4. Update")
print("5. Contact Me")
print("6. Exit")
print("=====================================")
# Do again if user write incorrect option
while True:
try:
daftar = int(input("Choose: "))
break
except (ValueError, TypeError, NameError, KeyboardInterrupt):
print("You must write a number!")
if daftar == 1:
print("=====================================")
print("you choose search")
print("=====================================")
search = input("Search: ")
combine = "https://botostore.com/search/?q=" + search
r = requests.get(combine, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safar537.36 Edg/108.0.1462.54'})
soup = BeautifulSoup(r.text, 'html.parser')
for lists in soup.find_all('div', class_='tpl-block-list tpl-component-netcat-module-search-result tpl-template-new-api-search'):
print("\033[1mSearch Result : "+ lists.find('strong').text,"\033[0m\n")
for content in lists.find_all('div', class_='row justify-content-center pt-5 mb-3 no-gutters'):
for link in content.find('div', class_='col-sm-12 col-md-8 col-lg-6').find_all('a', class_='d-block pb-3 mb-3 text-body element search-element'):
print("Bot Name: " + link.find('h4', class_="e-title").text)
print("Bot Description: " + link.find('div', class_='e-description').text)
element = link.find('span', title='Bot is active and replies instantly')
if element:
print("Bot Status: " + element.text)
else:
print("Bot Status: Offline")
botlink2 = "https://botostore.com" + link.get('href')
print("Bot Link: " + botlink2 + "?do=open_card")
print("=====================================")
# print(link.get('href'))
print("\n")
asking = str(input("do you want to open bot link ? (y/n) "))
if asking == "y" or asking == "Y":
inputlink = input("Write bot link: ")
if platform == "linux" or platform == "linux2":
os.system('clear||cls')
os.system("xdg-open " + inputlink)
elif platform == "win32":
os.system('clear||cls')
os.startfile(inputlink)
elif platform == "darwin":
os.system('clear||cls')
os.system("open " + inputlink)
else:
print("Your platform is not supported")
time.sleep(3)
os.system('clear||cls')
sys.exit(1)
elif asking == "n":
os.system('clear||cls')
sys.exit(1)
else:
os.system('clear||cls')
time.sleep(3)
print("You must write y or n")
sys.exit(1)
print("=====================================")
# reverse count from 5 to 1
for i in range(5, 0, -1):
print(i)
time.sleep(1)
os.system('clear||cls')
sys.exit(1)
elif daftar == 2:
print("You choose see all")
print("=====================================")
print("Here is the list of bots: ")
print("\n")
for lists in soup.find_all('div', class_='row justify-content-center no-gutters'):
for content in lists.find_all('div', class_='col-sm-6 col-lg-3'):
print(content.find('h4').text)
for divstyle in content.find_all('div', style='height:120px;margin:1.5rem 1.5rem 1rem;overflow:hidden'):
print(divstyle.find('div', class_="e-description").text)
print(content.find('div', title='Bot is active and replies instantly').text, "Bot Status is ", content.find('div', title='Bot is active and replies instantly').find('span', class_="text-primary").text)
botlink = content.find('a', class_="mb-3 btn btn-sm btn-outline-primary").get('href')
gabung = url + botlink
print("Bot link: " + gabung)
print("\n")
asking = str(input("do you want to open bot link ? (y/n) "))
if asking == "y" or asking == "Y":
inputlink = input("Write bot link: ")
if platform == "linux" or platform == "linux2":
os.system('clear||cls')
os.system("xdg-open " + inputlink)
elif platform == "win32":
os.system('clear||cls')
os.startfile(inputlink)
elif platform == "darwin":
os.system('clear||cls')
os.system("open " + inputlink)
else:
print("Your platform is not supported")
time.sleep(3)
os.system('clear||cls')
sys.exit(1)
elif asking == "n":
os.system('clear||cls')
sys.exit(1)
else:
print("You must write y or n")
time.sleep(3)
os.system('clear||cls')
sys.exit(1)
print("=====================================")
# reverse count from 5 to 1
for i in range(5, 0, -1):
print(i)
time.sleep(1)
os.system('clear||cls')
sys.exit(1)
elif daftar == 3:
print("You choose donation")
print("=====================================")
print("Thanks for your donation")
print("=====================================")
# for i in range(0, 3):
# i += 1
# print(i)
# time.sleep(1)
print('''
1. Dana (Not Supported termux) https://t.me/xnuvers07
2. Saweria
3. Seabank
''')
pilih = int(input("Choose your payment method: "))
if pilih == 1:
root = tk.Tk()
root.title("Donation")
image_url = "https://ndraeee25.000webhostapp.com/dana/DanaXnuvers007.jpeg"
response = requests.get(image_url)
img_data = response.content
img = ImageTk.PhotoImage(Image.open(BytesIO(img_data)))
panel = tk.Label(root, image=img)
panel.pack(side="bottom", fill="both", expand="yes")
root.mainloop()
elif pilih == 2:
if platform == "linux" or platform == "linux2":
os.system('clear||cls')
os.system("xdg-open https://saweria.co/xnuvers007")
elif platform == "win32":
os.system('clear||cls')
os.startfile("https://saweria.co/xnuvers007")
elif platform == "darwin":
os.system('clear||cls')
os.system("open https://saweria.co/xnuvers007")
else:
print("Your platform is not supported")
time.sleep(3)
os.system('clear||cls')
sys.exit(1)
elif pilih == 3:
print("=====================================")
print("Account Number: 901276459950")
print("Account Name: Indra Dwi A")
print("=====================================")
else:
sys.exit(1)
elif daftar == 4:
print("You choose update")
print("=====================================")
os.system('clear||cls')
print("=====================================")
print("Checking for update")
os.system("git pull")
print("=====================================")
print("Update complete")
print("=====================================")
# reverse count from 5 to 1
for i in range(5, 0, -1):
print(i)
time.sleep(1)
os.system('clear||cls')
sys.exit(1)
elif daftar == 5:
print("You choose contact me")
print("=====================================")
print("Contact me on: ")
print("=====================================")
print("Channel = https://t.me/xnuvers07")
print("do you want to open it ? (y/n)")
op = str(input("y/n: "))
if op == "y" or op == "Y":
if platform == "linux" or platform == "linux2":
os.system('clear||cls')
os.system("xdg-open https://t.me/xnuvers07")
elif platform == "win32":
os.system('clear||cls')
os.startfile("https://t.me/xnuvers07")
elif platform == "darwin":
os.system('clear||cls')
os.system("open https://t.me/xnuvers07")
else:
print("Your platform is not supported")
time.sleep(3)
os.system('clear||cls')
sys.exit(1)
elif op == "n" or op == "N":
os.system('clear||cls')
sys.exit(1)
else:
os.system('clear||cls')
sys.exit(1)
elif daftar == 6:
print("You choose exit")
print("=====================================")
print("Thanks for using this program")
print("=====================================")
# reverse count from 5 to 1
for i in range(5, 0, -1):
print(i)
time.sleep(1)
os.system('clear||cls')
sys.exit(1)
else:
print("=====================================")
print("You must write a number 1 or 2")
print("=====================================")
# reverse count from 5 to 1
for i in range(5, 0, -1):
print(i)
time.sleep(1)
os.system('clear||cls')
sys.exit(1)