This commit is contained in:
parent
e1e805a91b
commit
954b019ef2
@ -39,6 +39,7 @@ class FlareRequests(requests.Session):
|
|||||||
content = response.json()
|
content = response.json()
|
||||||
|
|
||||||
if "solution" in content:
|
if "solution" in content:
|
||||||
|
encoding = None
|
||||||
solution = content["solution"]
|
solution = content["solution"]
|
||||||
if "content-type" in solution["headers"]:
|
if "content-type" in solution["headers"]:
|
||||||
content_type = solution["headers"]["content-type"].split(";")
|
content_type = solution["headers"]["content-type"].split(";")
|
||||||
@ -53,7 +54,7 @@ class FlareRequests(requests.Session):
|
|||||||
resolved.headers = solution["headers"]
|
resolved.headers = solution["headers"]
|
||||||
resolved.raw = io.BytesIO(solution["response"].encode())
|
resolved.raw = io.BytesIO(solution["response"].encode())
|
||||||
resolved.url = url
|
resolved.url = url
|
||||||
resolved.encoding = encoding or None
|
resolved.encoding = encoding
|
||||||
resolved.reason = content["status"]
|
resolved.reason = content["status"]
|
||||||
resolved.cookies = solution["cookies"]
|
resolved.cookies = solution["cookies"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user