mosint/modules/RelatedNumbers.py
Çalgan Aygün e0087488a1 Update RelatedNumbers method
Code cleaned
2020-11-28 11:30:15 +03:00

19 lines
643 B
Python

from bs4 import BeautifulSoup
import requests, re
from insides.bcolors import bcolors
def RelatedNumbers(mail, _verbose=None):
if _verbose != None:
try:
html = requests.get(f"https://domainbigdata.com/email/{ mail }").content
soup=BeautifulSoup(html,"html.parser")
rgx = str(soup)
phones = re.findall('<td colspan="2">\+.*.</td>', rgx)
for phone in phones:
number = phone.replace("<td colspan="+'"'+'2'+'"'+'>', "").replace("</td>","")
print(number)
if len(phones) == 0:
print(f"{bcolors.FAIL}No phone numbers found!{bcolors.ENDC}")
except:
print(f"{bcolors.FAIL}Phone Number Data Error!{bcolors.ENDC}")