我已经开始写一个scrapy spider,当我在VS代码中运行spider时,我一直得到这个错误。
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args,**kw)
File "/usr/lib/python3/dist-packages/scrapy/spiders/__init__.py", line 90, in parse
raise NotImplementedError('{}.parse callback is not defined'.format(self.__class__.__name__))
NotImplementedError: PukeSpider.parse callback is not
defined
这是密码
import scrapy
class ScatSpider(scrapy.Spider):
name = 'videos'
start_urls = [
'https://thisvid.com/tags/scat/',
]
def parse(self, response):
for videos in response.css('a.tumbpu'):
yield {
'title': response.css('span.title::text').get(),
'link': response.css('a.tumbpu::text').attrib['href']
}
1条答案
按热度按时间ltskdhd11#
"萨米尔·达斯"