java htmlunit hellod_JSoup doesn't load the whole HTML [duplicate]
发布日期:2021-06-24 16:47:47 浏览次数:2 分类:技术文章

本文共 919 字,大约阅读时间需要 3 分钟。

I want to scrape a website but when I connect to it using Jsoup.connect(url) only a part of the page is loaded.

When I downloaded the page as html I saw that in one part of the page there is only a loader icon so I concluded that that part of the page is loaded afterwards from some other source.

The funny thing is that inspect element contains the missing html and view page source doesn't. HTML loaded from jSoup is basically the same as when opened from "view page source".

Is there a way to bypass this and to load the whole page as it is displayed in browser?

Ask for any additional information I could provide.

===============

EDIT: I am connecting to url like this:

Document doc = null;

try {

doc = Jsoup.connect(url).get();

} catch (IOException e) {

e.printStackTrace();

}

I am getting this div using css selector:

Elements tournamentTable = doc.select("div[id=tournamentTable]");

Content of tournamentTable is

转载地址:https://blog.csdn.net/weixin_33946505/article/details/114125508 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:java的bin目录_JDK的bin目录下那些常见工具使用集锦
下一篇:java rmi 实例_JAVA RMI 实例

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年04月22日 00时25分20秒