Merge pull request #8 from ronaldseoh/enforce-encoding

enforce utf-8 encoding when we open data.json
This commit is contained in:
Siddharth Dushantha 2018-12-26 13:42:31 +01:00 committed by GitHub
commit 52d1c09c21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ def main():
print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Checking username\033[0m\033[1;37m {}\033[0m\033[1;92m on: \033[0m".format(username))
raw = open("data.json", "r")
raw = open("data.json", "r", encoding="utf-8")
data = json.load(raw)
# User agent is needed because some sites does not