使用xpath解析一個簡單的html文件,想獲取href屬性的值: html = etree.parse('test.html',etree.HTMLParser()) print(html.xpath('//li/a@href'))
確定! 回上一頁