Skip to content

Commit

Permalink
Merge pull request psf#160 from SN9NV/patch-1
Browse files Browse the repository at this point in the history
Create LXML from raw_html
  • Loading branch information
kennethreitz committed Sep 18, 2018
2 parents f760df2 + 2a7d087 commit 29acbaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions requests_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def pq(self) -> PyQuery:
of the :class:`Element <Element>` or :class:`HTML <HTML>`.
"""
if self._pq is None:
self._pq = PyQuery(self.html)
self._pq = PyQuery(self.lxml)

return self._pq

Expand All @@ -159,7 +159,7 @@ def lxml(self) -> HtmlElement:
try:
self._lxml = soup_parse(self.html, features='html.parser')
except ValueError:
self._lxml = lxml.html.fromstring(self.html)
self._lxml = lxml.html.fromstring(self.raw_html)

return self._lxml

Expand Down

0 comments on commit 29acbaa

Please sign in to comment.