Skip to content
Advertisement

Why can’t I extract the other pages of the same website using beautifulsoup

I wrote this code to extract multiple pages of data from this site (base URL – “https://www.goodreads.com/shelf/show/fiction“).

JavaScript

But it’s only showing the first 50 books’ data. How can I extract all fiction books’ names extracting all pages using beautifulsoup?

Advertisement

Answer

You can make the pagination from fiction category of the books from your base base url, you need to input the fiction keyword in search box and click on search button then you will get this url :https://www.goodreads.com/search?q=fiction&qid=ydDLZMCwDJ and from here you have to collect data and to make the next pages.

JavaScript

Output:

JavaScript
Advertisement