Skip to content
Advertisement

How to go to the next page using BeautifulSoup?

I am trying to scrape data from all the 37 web pages from this website.

The website I am scrapping doesn’t allow going to the next page through the search bar.

This is the HTML written for the next button.

JavaScript

I know that this can be done with Selenium, but is there any way to do this with BeautifulSoup?

Is there any way to scrape data from the next page?

Advertisement

Answer

So you can go to each page using requests here. It’s through a post request, that then uses the query page parameter to get back the data for sequential pages:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement