这里面明明有个数据,然后我定位到这个标签却显示是个空的
我该怎么才能弄到在这个数据啊
好初级的问题...
import requests
from lxml.html import etree
url = 'https://www.cosme.net/product/product_id/10189603/top'
res =requests.get(url)
res_demo = etree.HTML(res.text)
meta_content = res_demo.xpath("//*[@property='og:title']/@content")[0].split('|')[2]
print(meta_content)
谢谢大哥,我是新手,不太会,只知道就是xpath然后标签定位
谢谢啦