Skip to content

Commit 7e1bfc1

Browse files
Fixed wrong WHOIS gathering function behaviour (#76)
1 parent c8bd9ab commit 7e1bfc1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

datagather_modules/crawl_processor.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,22 @@ def whois_gather(short_domain):
2525
try:
2626
logging.info('WHOIS INFO GATHERING: OK')
2727
w = whois.whois(short_domain)
28+
print(w)
2829
if w.org is None:
2930
w['org'] = 'n/a'
3031
logging.info('WHOIS INFO GATHERING: OK')
3132
return w
3233
except Exception as e:
3334
print(Fore.RED + "Error while gathering WHOIS information. See journal for details")
3435
logging.error(f'WHOIS GATHERING: ERROR. REASON: {e}')
36+
w = {
37+
'registrar': 'N/A',
38+
'creation_date': 'N/A',
39+
'expiration_date': 'N/A',
40+
'name_servers': ['N/A'],
41+
'org': 'N/A'
42+
}
43+
return w
3544
pass
3645

3746
def contact_mail_gather(url):

0 commit comments

Comments
 (0)