About scrapy framework

import scrapy

class QuotesSpider(scrapy.Spider):
name = “quotes”

def start_request(self):
    start_urls = [
    "http://quotes.toscrape.com/page/1/",
    "http://quotes.toscrape.com/page/2/",
     ]
    for url in start_urls:
        yield scrapy.Request(url=url,callback=self.parse)

def parse(self, response):
    page = response.url.split("/")[-2]
    filename = 'quotes-%s.html' % page
    with open(filename, 'wb') as f:
        f.write(response.body)
    self.log("saved file %s"% filename)

this is my code while running it on command prompt and error is showing that’s it’s a keyerror spider not found .

Hi @Nikhil799,
I request you to checkout this post about the very same problem you are placing.


Let me know if your issue is the same or if the solution suggested there can also resolve your issue.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.