1
0
mirror of https://github.com/minoplhy/filters-maker.git synced 2024-12-22 18:18:13 +00:00

Clear Blank Space after merged file in add_file module

This commit is contained in:
minoplhy 2021-08-11 00:23:40 +07:00
parent e2ad2d6f63
commit 7c6893cae4

View File

@ -25,6 +25,12 @@ def add_file(incoming,excluded_in):
lines = set(f.readlines())
with open(incoming, 'w') as f:
f.writelines(set(lines))
with open(incoming ,'r') as f:
lines = f.read().split()
with open(incoming ,'w') as f:
for line in lines:
if line.strip():
f.write('\n'.join([line + '\n']))
crawler.sort(incoming)
os.remove(excluded_in)