def handle_product_listing(self, response):
    selector = 'button.ln-c-button'
    urls = response.css('ul.productLister.gridView li.gridItem h3 a::attr(href)').extract()
    for url in urls:
        (yield SeleniumRequest(url=url, callback=self.parse_product, wait_time=10, wait_until=EC.element_to_be_clickable((By.CSS_SELECTOR, selector))))
    next_page = response.css('#productLister > div.pagination.paginationBottom > ul > li.next > a::attr(href)').extract()
    if next_page:
        (yield response.follow(next_page, callback=self.handle_product_listing))
def handle_product_listing(self, response):
    selector = 'button.ln-c-button'
    urls = response.css('ul.productLister.gridView li.gridItem h3 a::attr(href)').extract()
    for url in urls:
        (yield SeleniumRequest(url=url, callback=self.parse_product, wait_time=10, wait_until=EC.element_to_be_clickable((By.CSS_SELECTOR, selector))))
    next_page = response.css('#productLister > div.pagination.paginationBottom > ul > li.next > a::attr(href)').extract()
    if next_page:
        (yield response.follow(next_page, callback=self.handle_product_listing))