mirror of
https://github.com/minoplhy/filters-maker.git
synced 2024-12-22 18:18:13 +00:00
Fix excluded Line Problem
This commit is contained in:
parent
bb59f4c232
commit
a8a565f1b5
11
excluder.py
11
excluder.py
@ -13,9 +13,14 @@ def add(incoming,input):
|
||||
crawler.sort(incoming)
|
||||
|
||||
def add_file(incoming,excluded_in):
|
||||
with open(incoming, "wb") as outfile:
|
||||
with open(excluded_in, "rb") as infile:
|
||||
outfile.write(infile.read())
|
||||
data= ""
|
||||
with open(incoming) as fp:
|
||||
data = fp.read()
|
||||
with open(excluded_in) as fp:
|
||||
data2 = fp.read()
|
||||
data += data2
|
||||
with open (incoming, 'w') as fp:
|
||||
fp.write(data + '\n')
|
||||
with open(incoming, 'r') as f:
|
||||
lines = set(f.readlines())
|
||||
with open(incoming, 'w') as f:
|
||||
|
Loading…
Reference in New Issue
Block a user