Files
odiseectf/yt/fixcomments.py
2018-12-16 14:17:14 +01:00

16 lines
316 B
Python

import json
with open('comments-AKLrKMz-avE.json', 'r', encoding="utf8") as infile:
j = json.load(infile)
for item in j:
try:
with open('lijst.txt','a') as outfile:
if (item["commentText"]):
temp = item["commentText"]
outfile.write(temp+"\n")
except KeyError:
print("wss een comment reply")