Below is my code I am using to scrape data from Bookstore but it not working. Error like 404 response none and NotImplementationError callback is generating.
import scrapy
class Book_Store(scrapy.Spider):
name='BookSpider'
def start_requests(self):
urls=["http://books.toscrape.com/catalogue/page-1.html",]
for url in urls:
yield scrapy.Request(url=url, callback=self.parse)
def parse(self, response):
for i in response.css('article.product_pod'):
image=i.css('div.image_container a img::attr(src)').get()
booktitle= i.css('h3 a::attr(title)').get()
bookprice= i.css('div.product_price p.price_color::text').get()
yield {
'image_url': image,
'book_title': booktitle,
'product_price': bookprice,
}
next_page= response.css('ul.pager li.next a::attr(href)').get()
if next_page is not None:
next_page= response.urljoin(next_page)
yield scrapy.Request(next_page, callback=self.parse)