【问题标题】:a small python crawler puzzle一个小蟒蛇爬虫拼图
【发布时间】:2020-06-19 06:45:51
【问题描述】:

我的代码:

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 css css-selectors


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-29
    • 1970-01-01
    • 2013-03-05
    • 2014-03-12
    • 2010-10-27
    • 1970-01-01
    • 1970-01-01
    • 2019-11-07
    相关资源
    最近更新 更多