Merge pull request #384 from m654z/redditcrawl-fix

Fix encoding issue
This commit is contained in:
Aeywoo 2022-04-05 20:49:08 +09:30 committed by GitHub
commit d9f2f17cb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,8 +3,8 @@
import json
import time
outfile = open('temp_atlas.json', 'w')
failfile = open('manual_atlas.json', 'w')
outfile = open('temp_atlas.json', 'w', encoding='utf-8')
failfile = open('manual_atlas.json', 'w', encoding='utf-8')
credentials = open('credentials', 'r')
client_id = credentials.readline().strip(' \t\n\r')
@ -71,4 +71,4 @@
print("written "+submission.id+" submitted "+str(round(time.time()-submission.created_utc))+" seconds ago")
successcount += 1
print(f"\n\nSuccess: {successcount}\nFail: {failcount}\nPlease check manual_atlas.txt for failed entries to manually resolve.")
print(f"\n\nSuccess: {successcount}\nFail: {failcount}\nPlease check manual_atlas.txt for failed entries to manually resolve.")