forked from Mirrors/itch-dl
Open JSON files in binary mode
This avoids any encoding errors caused by JSON files containing non-ASCII characters (e.g. emojis).
This commit is contained in:
committed by
Dragoon Aethis
parent
8ae034a139
commit
49ad7a719c
@@ -150,7 +150,7 @@ def get_jobs_for_itch_url(url: str, client: ItchApiClient) -> List[str]:
|
|||||||
|
|
||||||
def get_jobs_for_path(path: str) -> List[str]:
|
def get_jobs_for_path(path: str) -> List[str]:
|
||||||
try: # Game Jam Entries JSON?
|
try: # Game Jam Entries JSON?
|
||||||
with open(path) as f:
|
with open(path, "rb") as f:
|
||||||
json_data = json.load(f)
|
json_data = json.load(f)
|
||||||
|
|
||||||
if not isinstance(json_data, dict):
|
if not isinstance(json_data, dict):
|
||||||
|
|||||||
Reference in New Issue
Block a user