【发布时间】:2021-02-27 18:06:57
【问题描述】:
我正在尝试抓取 ebay 列表的描述,并且正在接近它:
def parse_description(self, response):
description = response.css('div#ds_div*::text').get()
yield {
"description": description
}
这个想法是获取 .css('div#ds_div') 下所有标签的文本 但是,我将其视为错误:
"Expected selector, got %s" % (peek,))
File "<string>", line None
cssselect.parser.SelectorSyntaxError: Expected selector, got <DELIM '*' at 10>
我要抓取的示例 URL:https://www.ebay.co.uk/itm/Vintage-Toastmaster-Chrome-Toaster-Model-D182-4-Slice-Wide-Slot-Nos/114677725765?hash=item1ab3533a45:g:ui8AAOSw-jpgBbFS 我哪里错了?
【问题讨论】:
标签: python css scrapy selector children