I am scraping the Flipcart website and I want to extract the image URL from the website. This is the link to the website.
import scrapy
from ..items import FlipcartItem
class QuotesSpider(scrapy.Spider):
name='quotes'
start_urls=[
'https://www.flipkart.com/clothing-and-accessories/topwear/pr?sid=clo%2Cash&otracker=categorytree&p%5B%5D=facets.ideal_for%255B%255D%3DMen'
]
def parse(self,response):
items=FlipcartItem()
image_url=response.css('._2r_T1I img::attr(src)').extract()
#product_page_url=response.css('').extract()
items['image_url']=image_url
#items['product_page']=title
yield items
This is the code I have written and while running the code I am getting the empty list.Like image_url ["","",""].Can anyone please suggest where I am going wrong?