The xpath string method in python reports an error

tr_list = self.driver.find_elements_by_xpath("//table[@class="hyreport-table tl"]/tbody//tr")
     for i in range(0,100):

           for i  in range(0,len(tr_list)):
                content=etree(tr_list[i]).xpath("string(//*[@class="pl20"])")
                source=etree(tr_list[i]).xpath("//td[@class="ellipsis"]/span/text()")
                size=etree(tr_list[i]).xpath("//td[5]/text()")
                report_time=etree(tr_list[i]).xpath("//td[6]/text()")
                print(":")



Traceback (most recent call last):
      File "qimingpian.py", line 115, in <module>
        qimingpian().get_content()
      File "qimingpian.py", line 92, in get_content
        content=etree(tr_list[i]).xpath("string(//*[@class="pl20"])")
    TypeError: "module" object is not callable
Mar.28,2021

looks like I'm using selenium, to get the child node here. I remember it's just tr_ list [I]. Find _ element_by_xpath (). If etree is imported from lxml, I can't write it that way. No, no, no.


etree that's how I use it. I'll give you a reference

.
from lxml import etree   -sharp 
selector = etree.HTML(str("HTML")) 
result= selector.xpath('//div[@class="WB_handle"]//li[2]//em[2]/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-1bf186d-31da2.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-1bf186d-31da2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?