Hi,
I am currently scraping this page. https://www.tokopedia.com/perkakaskubosch/page/2
For the pagination, i will like to only scrape the next page and not the previous page URL.
<div class="official-shop-paging">
<ul>
<li><a class="mr-10" href="https://www.tokopedia.com/perkakaskubosch">❮</a></li>
<li><a href="https://www.tokopedia.com/perkakaskubosch/page/3">❯</a></li>
</ul>
</div>
Previous page (denoted by a <) has a anchor class of "mr-10" while next page (denoted by >) does not have any anchor class.
My current selector is div.official-shop-paging li:last-of-type a
How should i modify the selector to only scrape next page and not previous page? Thank you!
PS. I forgot to elaborate. The reason i am asking is because on the last page, there is only a previous page and no next page.
<div class="official-shop-paging">
<ul>
<li><a class="mr-10" href="https://www.tokopedia.com/perkakaskubosch/page/2">❮</a></li>
</ul>
</div>
Hence i am trying to build my sitemap such that when it comes to the last page, it does not go back to previous page again.