How to deal with statements in http document format with Xpath directly under Python?

under the web page loaded by Ajax, manually copy something similar to < tbody > < tr class= "abcdefg" > < td > 1 < / td > < td > 3 < / td > < / tr > < / tbody >;

after copying this type of text, how do you convert it to a format that xpath can handle?

if you use the assignment statement directly, you will get a str type, which cannot be parsed directly with xpath to get

.

for example, I want to get the content of
name=text.xpath (". / td") [1] .text
this element,

if you directly use text= "< tbody > < tr class=" abcdefg "> < td > 1 < / td > < td > 3 < / td > < / tr > < / tbody >", you will report an error

.

SyntaxError: invalid syntax

Mar.06,2021

from lxml import etree


html = etree.HTML(text)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e462da-651ac.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e462da-651ac.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?