mirror of
https://github.com/jointakahe/takahe.git
synced 2025-02-16 15:45:14 +00:00
fix edge case when parsing remote json
This commit is contained in:
parent
7c34ac78ed
commit
814ad94b5f
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ def json_from_response(response: Response) -> dict | None:
|
||||||
charset = None
|
charset = None
|
||||||
|
|
||||||
for parameter in parameters:
|
for parameter in parameters:
|
||||||
|
if "=" not in parameter:
|
||||||
|
continue
|
||||||
key, value = parameter.split("=")
|
key, value = parameter.split("=")
|
||||||
if key.strip() == "charset":
|
if key.strip() == "charset":
|
||||||
charset = value.strip()
|
charset = value.strip()
|
||||||
|
|
Loading…
Reference in a new issue