aboutsummaryrefslogtreecommitdiff
path: root/src/utils/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/http.py')
-rw-r--r--src/utils/http.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index 9176fe20..d8b96dc7 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -53,14 +53,13 @@ def get_url(url, method="GET", get_params={}, post_data=None, headers={},
return response.code, soup
return soup
- data = response_content
+ data = response_content.decode(response.encoding)
if json and data:
try:
data = _json.loads(data)
except _json.decoder.JSONDecodeError as e:
raise HTTPParsingException(str(e))
- data = data.decode(response.encoding)
if code:
return response.status_code, data
else: