Skip to content

Commit

Permalink
Update RealtedNumbers method
Browse files Browse the repository at this point in the history
Code cleaned, bug fixed
  • Loading branch information
calganaygun committed Nov 26, 2020
1 parent 6f6a808 commit 51bcf44
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/RelatedNumbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
import requests, re
from insides.bcolors import bcolors

def RelatedNumbers(mail,_verbose=None):
def RelatedNumbers(mail, _verbose=None):
if _verbose != None:
try:
dnsurl = ("https://domainbigdata.com/email/"+mail)
response = requests.get(dnsurl)
html = response.content
html = requests.get(f"https://domainbigdata.com/email/{ mail }").content
soup=BeautifulSoup(html,"html.parser")
rgx = str(soup)
urls = re.findall('<td colspan="2">\+.*.</td>', rgx)
for x in range(len(urls)):
n = urls[x].replace("<td colspan="+'"'+'2'+'"'+'>', "")
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}")

0 comments on commit 51bcf44

Please sign in to comment.