def parse(self, response):
    self.driver.get(response.url)
while True:
    next = self.driver.find_element_by_xpath('//td[@class="pagn-next"]/a')
try:
    next.click()
except:
    break
self.driver.close()
selenium with scrapy for dynamic page