本文共 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 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!