Skip to content

Commit

Permalink
FixOutputNotAppending
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMeliz committed Oct 31, 2024
1 parent e474760 commit b689557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ def excludes(self, link):
# External links
elif link.startswith('http') and not link.startswith(self.website):
file_path = self.out_path + '/' + now + '_ext-links.txt'
with open(file_path, 'w+', encoding='UTF-8') as lst_file:
with open(file_path, 'a+', encoding='UTF-8') as lst_file:
lst_file.write(str(link) + '\n')
return True
# Telephone Number
elif link.startswith('tel:'):
file_path = self.out_path + '/' + now + '_telephones.txt'
with open(file_path, 'w+', encoding='UTF-8') as lst_file:
with open(file_path, 'a+', encoding='UTF-8') as lst_file:
lst_file.write(str(link) + '\n')
return True
# Mails
elif link.startswith('mailto:'):
file_path = self.out_path + '/' + now + '_mails.txt'
with open(file_path, 'w+', encoding='UTF-8') as lst_file:
with open(file_path, 'a+', encoding='UTF-8') as lst_file:
lst_file.write(str(link) + '\n')
return True
# Type of files
Expand Down

0 comments on commit b689557

Please sign in to comment.