improvements

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-03-03 08:24:31 -05:00
parent 8af172c5ce
commit 6e1938e588
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -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 <Element>` or :class:`HTML <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
+1 -1
View File
@@ -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 = [