import htmlimport etree
url_h2 = selector.xpath("//a[@_stat=‘video:poster_v‘]/../h2")[0]url_div = selector.xpath("//a[@_stat=‘video:poster_v‘]/../div")[0]url_h2 = etree.tostring(url_h2).decode()url_div = etree.tostring(url_div).decode()print("******", url, url_img, html.unescape(url_h2), html.unescape(url_div))
原文地址:https://www.cnblogs.com/guanong/p/10363545.html
时间: 2024-10-03 14:45:32