html_name = html_path + 'pn_2.html'
htmlf = open( html_name, 'r', encoding = "utf-8")
html = htmlf.read()
#htmlf = open( html_name, 'r', encoding = "utf-8") .read()
comment = etree.HTML(html)
pic_list = etree.HTML(html).xpath('//ul/li/div[1]/a/img/@lazy_src')
print(len(pic_list))
网友评论