小编run*_*joe的帖子

使用 scrapy css 选择器定位 id

HTML = '
    <div class="box">
        <div id="grid">
            <div class="content">hello</div>
        </div>
    </div>
'
Run Code Online (Sandbox Code Playgroud)

--事情发生在这里--

response.css('div.thread [*] div.mix').getall()
Run Code Online (Sandbox Code Playgroud)

*如何在没有类的情况下搜索 div?无论我在网上找到什么建议,我都会收到错误“预期某些内容已被删除......”

python scrapy

2
推荐指数
1
解决办法
2831
查看次数

标签 统计

python ×1

scrapy ×1