aboutsummaryrefslogtreecommitdiff
path: root/src/utils/http.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-09 14:48:26 +0100
committerGravatar jesopo2019-09-09 14:48:26 +0100
commit1df82c1cb20eab4611c1f260818ac9c0ac9bec64 (patch)
tree38eb84ed6993d4966024151194a707f822c396b9 /src/utils/http.py
parentonly look for <meta>-related tags when there are meta tags (diff)
signature
still default to iso-latin-1 if no on-page or in-header content-type is present
Diffstat (limited to 'src/utils/http.py')
-rw-r--r--src/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index 232b1c6b..b20b2264 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -125,7 +125,7 @@ def request(url: str, method: str="GET", get_params: dict={},
encoding = response.encoding
if content_type and content_type in SOUP_CONTENT_TYPES:
souped = bs4.BeautifulSoup(response_content, parser)
- encoding = _find_encoding(souped) or encoding
+ encoding = _find_encoding(souped) or encoding or "iso-8859-1"
def _decode_data():
return response_content.decode(encoding)