在使用Python中的XPath爬取路径时,想看看成功,却出现.content.decode("utf-8")

    get_id = requests.get(URL,headers=headers).content.decode("utf-8")
    # txt = get_id.text
    html_id = etree.HTML(get_id)
    div = html_id.xpath('//div[@class="section"]')
    print(div)

结果却是:[<Element div at 0x233c162ad80>]。我获取我网页代码呢?为什么是字典,而且还输出不了。

你text获取一下文本,可以看看我置顶的那篇selenium文