XML - How to get link from <a> element when there is no link on href

276 Views Asked by At
<ul class='pagination'>
    <li class='active'>
        <a class='btnPage' href='#' page='1'></a>
    </li>
    <li class>
        <a class='btnPage' href='#' page='2'>Next</a>
    </li>
</ul>

I have this Html above and I need to get the link to the next page, with XPath.

The link that is the first page: https://example.com/Search?

And the link when I click on the next button/a element: https://example.com/Search?Page=2

Just a note if it's useful, I'm using Scrapy with Splash.

Can I get the link as supposed when I click the button/a with XPath ?

0

There are 0 best solutions below