一个小python爬虫拼图

问题描述 投票:0回答:1
import requests
from parsel import Selector


url = 'https://www.vmall.com/product/10086763808943.html?cid=99844'
resp = requests.get(url)
# print(resp.text)
sel = Selector(resp.text)
res = sel.css('#pro-name::text').extract()
print(res)

谁可以解释这个“ res = sel.css('#pro-name :: text')。extract()”,为什么这里必须使用两个“:”原谅我可怜的英语,今天过得很愉快。

python web-crawler
1个回答
0
投票

如果我理解正确,那行就是CSS样式。之前曾问过类似的问题:

What does the double colon (::) mean in CSS?

© www.soinside.com 2019 - 2024. All rights reserved.