The Html code snippet is given below. i want some response.xpath(......) to get the link of the pagination. I tried doing
response.xpath('//*[@class="ui2-pagination-pages"]/a/@href').extract()
but it doesnot give anything. What am i doing wrong here? Thanks.
<div class="ui2-pagination-pages">
<a href="javascript:void(0)" class="prev" data-role="prev">Prev</a>
<a rel="nofollow" href="//www.alibaba.com/showroom/acrylic-wine-box_1.html">1</a>
<a rel="nofollow" href="//www.alibaba.com/showroom/acrylic-wine-box_2.html">2</a>
<a rel="nofollow" href="//www.alibaba.com/showroom/acrylic-wine-box_3.html">3</a>
<span class="current">4</span>
<a rel="nofollow" href="//www.alibaba.com/showroom/acrylic-wine-box_5.html">5</a>
<a rel="nofollow" href="//www.alibaba.com/showroom/acrylic-wine-<span class="interim">...</span>
<a rel="nofollow" href="//www.alibaba.com/showroom/acrylic-wine-box_103.html">103</a>
<a href="javascript:void(0)" class="next" data-role="next">Next</a>
</div>
I want to scrap all the paginated links and want to loop through it. How do i do it?