browser-history-generator/csvshortner.py
2024-01-12 22:12:34 -05:00

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