mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 23:00:20 +00:00
fix: fstring formatted with bytes
This commit is contained in:
+2
-2
@@ -416,9 +416,9 @@ class HTML(BaseParser):
|
||||
if isinstance(html, str):
|
||||
html = html.encode(DEFAULT_ENCODING)
|
||||
|
||||
pq = PyQuery(html)
|
||||
super(HTML, self).__init__(
|
||||
# Convert unicode HTML to bytes.
|
||||
element=PyQuery(html)('html') or PyQuery(f'<html>{html}</html>')('html'),
|
||||
element=pq('html') or pq.wrapAll('<html></html>')('html'),
|
||||
html=html,
|
||||
url=url,
|
||||
default_encoding=default_encoding
|
||||
|
||||
Reference in New Issue
Block a user