We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the script that reproduces the crash
import urllib.request import selectolax with urllib.request.urlopen( "https://rhodes-ltd-339.myshopify.com" ) as response: data = response.read() html = data.decode("utf-8") parser = selectolax.lexbor.LexborHTMLParser(html) for elem in parser.head.iter(): print("tag", elem.tag) print("attributes", elem.attributes) print("done")
It crashes when trying to access attributes of 3rd comment
The text was updated successfully, but these errors were encountered:
Commenting to indicate another case where the lexbor causes segmentation fault but modest works:
lexbor
modest
Causes segmentation fault:
import selectolax parser = selectolax.lexbor.LexborHTMLParser("") for node in parser.root.traverse(): parent = node.parent.attributes.get("anything") print("done")
Works as expected:
import selectolax parser = selectolax.parser.HTMLParser("") for node in parser.root.traverse(): parent = node.parent.attributes.get("anything") print("done")
In lexbor the issue seems to be that when generating html elements the parents of those generated elements won't have .attributes in some cases
.attributes
Sorry, something went wrong.
No branches or pull requests
Here is the script that reproduces the crash
It crashes when trying to access attributes of 3rd comment
The text was updated successfully, but these errors were encountered: