Update 'crawler.py'

This commit is contained in:
Kale 2021-08-17 22:15:39 -07:00
parent 53607648cb
commit 5bbf6b4a72
No known key found for this signature in database
GPG Key ID: F8A6CE83F1274467

View File

@ -75,6 +75,11 @@ def filteringcon(filters_regex_one):
if not line.endswith((tuple(remove_words))):
f.write('\n'.join([line + '\n']))
f.close()
with open(filters_regex_one, 'r') as f:
lines = f.read().splitlines()
with open(filters_regex_one, 'w') as f:
for line in lines:
f.write('\n'.join(line.split())
def killingdup(duplicated_file):
print('Getting rid of duplicated line')