Merge pull request #8 from ronaldseoh/enforce-encoding

enforce utf-8 encoding when we open data.json
pull/12/head
Siddharth Dushantha 6 years ago committed by GitHub
commit 52d1c09c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)) 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) data = json.load(raw)
# User agent is needed because some sites does not # User agent is needed because some sites does not

Loading…
Cancel
Save