.decode plaintext returns from utils.http.get_url

This commit is contained in:
jesopo 2018-10-10 15:06:30 +01:00
parent fda881b0ba
commit 015fa8ddff

View file

@ -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: