且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Scrapy css 选择器:获取所有内部标签的文本

更新时间:2023-08-25 12:35:34

response.css('mytag *::text')

* 将访问 mytag 的所有内部标签,::text 将获取每个标签的文本

The * will visit all the inner tags of mytag and ::text will get the text of each of them