mosint/modules/RelatedNumbers.py
Çalgan Aygün 51bcf448c3 Update RealtedNumbers method
Code cleaned, bug fixed
2020-11-26 23:15:37 +03:00

19 lines
640 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 = urls[x].replace("<td colspan="+'"'+'2'+'"'+'>', "").replace("</td>","")
print(n)
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}")