diff --git a/requests_html.py b/requests_html.py index e8429c6..b0855cb 100644 --- a/requests_html.py +++ b/requests_html.py @@ -241,7 +241,7 @@ class Session(requests.Session): if not response.encoding: response.encoding = DEFAULT_ENCODING - response.html = HTML(url=response.url, html=response.text, default_encoding=response.encoding) + response.html = HTML(url=response.url, html=response.content, default_encoding=response.encoding) return response