Skip to content

Commit b6d8629

Browse files
Fixed contact e-mails representation in PDF report (part of #42)
1 parent 8ed7eca commit b6d8629

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datagather_modules/crawl_processor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ def contact_mail_gather(url):
3535
for i in soup.find_all(href=re.compile("mailto")):
3636
i.encode().decode()
3737
mails.append(i.string)
38+
mails = [mail for mail in mails if mail is not None]
3839
if (not mails) or (mails is None):
3940
return 'No contact e-mails were found'
4041
else:
41-
return mails
42+
return ', '.join(map(str, mails))
4243
except requests.RequestException as e:
4344
print(Fore.RED + "Error while gathering e-mails. Reason: {}".format(e))
4445
pass

0 commit comments

Comments
 (0)