标签:ring 获取 string print post selector video xpath sele
import html
import 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))
标签:ring 获取 string print post selector video xpath sele
原文地址:https://www.cnblogs.com/guanong/p/10363545.html