Question

I want to get all the episodes title from this site. The problem is that it shows only 20 results and to get the others we must click an button that execute JavaScript. I'm using JSoup to retreive the html page. Here's the code of the button :

<div id="infinitePager-23-0-264741" class="j_w" data-infinitepager="
{"type":"button","pageSize":20,"pageCount":3,"contentSelector":".episodes_list_inner
table tbody","elementsSelector":".episode","url":"/series/ficheserie-10328/saison-21673/ajax","label":"Voir les épisodes 
précédents","pagerCssClass":"margin_0t","closeLabel":"Fermer",
"closeEnabled":true,"pageSizeLast":20}" data-w="infinitePager"> 

Is any way to get all the titles?

Was it helpful?

Solution

open your browser's developer tool and watch the network log, you will find the api that this page used to call with ajax, which returns the titles

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top