fix: [generator] remove header

pull/230/head
David Cruciani 2022-10-13 08:19:33 +02:00
parent 49922d0635
commit 3adfc0e309
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import argparse
def process(file, dst, numbers):
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 = {
'name': f'Top {numbers} websites from Majestic Million',

View File

@ -18,10 +18,16 @@ def process(files, dst):
'matching_attributes': ['hostname', 'domain', 'uri', 'url']
}
flag = True
for file in files:
with open(get_abspath_source_file(file)) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
for row in csv_reader:
if flag:
flag = False
print(True)
continue
v = row[1]
warninglist['list'].append(v.rstrip().rstrip('/'))