I want to scrape the name of products in this web page, but i get an empty list. I used splash for dynamic webpage but the result is the same. Can someone tell me what to do ? any other solution ?
This is the webpage that i want to scrape : https://www.woolworths.com.au/shop/browse/drinks/cordials-juices-iced-teas/iced-teas
import scrapy
from shop.items import ShopItem
from scrapy_splash import SplashRequest
class Spider(scrapy.Spider) :
name = 'productsspider'
start_urls = ['https://www.woolworths.com.au/shop/browse/drinks/cordials-juices-iced-teas/iced-teas']
def start_requests(self):
for url in self.start_urls:
yield SplashRequest(url=url, callback=self.parse, args={"wait":3})
def parse(self, response):
item = ShopItem()
for p in response.css(".divng-tns-c32-15 product-grid.ng-trigger.ng-trigger-staggerFadeInOut"):
item = productsItem()
item["product_name"] = p.css(".ng-tns-c32-15.product-grid--tile.ng-star-inserted .ng-tns-c32-15.product-grid--tile.ng-star-inserted shared-product-tile section .shelfProductTile-content div header a::text").extract()
yield item