commit
f9e7599209
|
@ -8,7 +8,7 @@ import argparse
|
||||||
def process(file, dst, numbers):
|
def process(file, dst, numbers):
|
||||||
|
|
||||||
with open(get_abspath_source_file(file), newline='\n', encoding='utf-8', errors='replace') as csv_file:
|
with open(get_abspath_source_file(file), newline='\n', encoding='utf-8', errors='replace') as csv_file:
|
||||||
sites = csv_file.readlines()[:numbers]
|
sites = csv_file.readlines()[1:numbers]
|
||||||
|
|
||||||
warninglist = {
|
warninglist = {
|
||||||
'name': f'Top {numbers} websites from Majestic Million',
|
'name': f'Top {numbers} websites from Majestic Million',
|
||||||
|
|
|
@ -18,10 +18,16 @@ def process(files, dst):
|
||||||
'matching_attributes': ['hostname', 'domain', 'uri', 'url']
|
'matching_attributes': ['hostname', 'domain', 'uri', 'url']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flag = True
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
with open(get_abspath_source_file(file)) as csv_file:
|
with open(get_abspath_source_file(file)) as csv_file:
|
||||||
csv_reader = csv.reader(csv_file, delimiter=',')
|
csv_reader = csv.reader(csv_file, delimiter=',')
|
||||||
for row in csv_reader:
|
for row in csv_reader:
|
||||||
|
if flag:
|
||||||
|
flag = False
|
||||||
|
print(True)
|
||||||
|
continue
|
||||||
v = row[1]
|
v = row[1]
|
||||||
warninglist['list'].append(v.rstrip().rstrip('/'))
|
warninglist['list'].append(v.rstrip().rstrip('/'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue