.decode plaintext returns from utils.http.get_url
This commit is contained in:
parent
fda881b0ba
commit
015fa8ddff
1 changed files with 1 additions and 0 deletions
|
@ -58,6 +58,7 @@ def get_url(url, method="GET", get_params={}, post_data=None, headers={},
|
||||||
except _json.decoder.JSONDecodeError as e:
|
except _json.decoder.JSONDecodeError as e:
|
||||||
raise HTTPParsingException(str(e))
|
raise HTTPParsingException(str(e))
|
||||||
|
|
||||||
|
data = data.decode(response.encoding)
|
||||||
if code:
|
if code:
|
||||||
return response.status_code, data
|
return response.status_code, data
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue