简体   繁体   English

使用JSoup获取JavaScript内容

[英]Using JSoup to get JavaScript content

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. 问题在于它仅显示20个结果,要获得其他结果,我们必须单击执行JavaScript的按钮。 I'm using JSoup to retreive the html page. 我正在使用JSoup检索HTML页面。 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? 有没有办法获得所有头衔?

打开浏览器的开发人员工具并查看网络日志,您将找到此页面用于通过ajax调用的api,该api返回标题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM