We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4392cf1 commit 6cf5810Copy full SHA for 6cf5810
selectolax/lexbor.pyx
@@ -204,7 +204,8 @@ cdef class LexborHTMLParser:
204
str
205
A string showing the number of characters in the parsed HTML.
206
"""
207
- return f"<LexborHTMLParser chars='{len(self.root.html)}'>"
+ html = len(self.root.html if self.root is not None else "")
208
+ return f"<LexborHTMLParser chars='{html_len}'>"
209
210
@property
211
def selector(self):
0 commit comments