12 lines
369 B
Python
12 lines
369 B
Python
csvname = 'top10milliondomains.csv'
|
|
output = 'top10kdomains.csv'
|
|
amount = 10000
|
|
|
|
counter = 0
|
|
with open(csvname, 'r') as file:
|
|
with open(output, 'w+')as fileout:
|
|
while counter <= amount:
|
|
domain = file.readline().split(",")[1].strip('"')
|
|
if domain == "Domain": continue
|
|
fileout.write(f"{domain}\n")
|
|
counter += 1 |