From 6e1938e5881096ce1ad558095322ead82dcc12c4 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 3 Mar 2018 08:24:31 -0500 Subject: [PATCH] improvements Signed-off-by: Kenneth Reitz --- requests_html.py | 3 +-- setup.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/requests_html.py b/requests_html.py index 41047eb..6b4ae4d 100644 --- a/requests_html.py +++ b/requests_html.py @@ -12,7 +12,6 @@ from pyquery.pyquery import fromstring from fake_useragent import UserAgent from lxml import etree from lxml.html import HtmlElement -from lxml.html.soupparser import fromstring as soup_parse from parse import search as parse_search from parse import findall, Result from w3lib.encoding import html_to_unicode @@ -128,7 +127,7 @@ class BaseParser: :class:`Element ` or :class:`HTML `. """ if self._lxml is None: - self._lxml = soup_parse(self.html, features='html.parser') + self._lxml = fromstring(self.html, parser='soup')[0] return self._lxml diff --git a/setup.py b/setup.py index dd54b3e..9d698aa 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ DESCRIPTION = 'HTML Parsing for Humans.' URL = 'https://github.com/kennethreitz/requests-html' EMAIL = 'me@kennethreitz.org' AUTHOR = 'Kenneth Reitz' -VERSION = '0.7.2' +VERSION = '0.7.3' # What packages are required for this module to be executed? REQUIRED = [