From 3029c048ea38d4ea4667bc0d79bdef9797e1e281 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 27 Feb 2018 07:18:28 -0500 Subject: [PATCH] fix #28 Signed-off-by: Kenneth Reitz --- requests_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests_html.py b/requests_html.py index 147d4e3..86fbc62 100644 --- a/requests_html.py +++ b/requests_html.py @@ -199,7 +199,7 @@ class HTML(BaseParser): def __init__(self, *, url, html, default_encoding=DEFAULT_ENCODING): super(HTML, self).__init__( - element=fromstring(html), + element=PyQuery(html)('html'), html=html, url=url, default_encoding=default_encoding