Commit 168936ef authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

date classifier

parent 30d91be1
......@@ -33,7 +33,7 @@ for news in json_file:
export_file = open(destination_path+'/'+news_date[:4]+'/'+news_date+'.json', 'a')
counter = 0
export_file.write('[')
export_file.write("[")
for line in json_file:
if line['date'] is not None:
......@@ -47,8 +47,8 @@ for news in json_file:
if counter == 1:
export_file.write(json.dumps(line))
elif counter > 1:
export_file.write(','+'\n'+json.dumps(line))
export_file.write(",\n" + json.dumps(line))
export_file.write(']')
export_file.write("]")
export_file.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment