Issue
If I use BeautifulSoup4 with the lxml
parser, how can I get the lxml etree object from a BeautifulSoup object?
I would use it to find elements by XPath. BeautifulSoup4 does not support XPath itself
Solution
lxml_root = etree.fromstring(str(soup).encode())
Answered By - funway
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.