-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkbeauty.py
76 lines (53 loc) · 1.53 KB
/
checkbeauty.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
import requests
from bs4 import BeautifulSoup
from time import sleep
def GetNumberData():
wow = str(input("enter the number"))
if wow.startswith("+"):
wow = wow.split("+")
wow = wow[1]
print(wow)
site = f"https://sms24.me/en/numbers/{wow}"
try:
goto = requests.get(site)
except SystemError as e: # need to add new exeception
print(e)
# else:
# print("Noot valid number")
soup = BeautifulSoup(goto.text, 'html.parser')
blank = soup.prettify()
# print(soup.body)
j = soup.body
# y = j.prettify()
# print(y)
f = j.find_all('span',class_="placeholder text-break") # return complete data as string
global array
array = []
# print(f[0])
# span_tag = soup.span.extract()
# span_string = span_tag.string.extract()
# print(span_string)
for z in f:
if z is not None:
array.append(z.string)
else:
print('#None')
print(array)
print("Options:Whatsapp | Telegram | Apple | Google")
choose = str(input("Choose options..."))
for x in array:
if choose in x:
print(x)
else:
print("Not yet ! wait")
Recheck(array)
def Recheck(incomming):
while array != incomming:
GetNumberData()
else:
TSec = str(input("No new datas, wanna wait for 30sec to grab new datas (Y/S)?"))
if TSec.upper() == "Y":
print("Sleeping for 30 ssecc...")
sleep(10)
GetNumberData()
GetNumberData()