0

In my website I have a "SHOW MORE" Button which sends javascript to show more text. I'm trying to make a app that can fetch text from my site.

I'm currently using jsoup, but it returns "blalblbla + "show more" So how do I get that hidden text that isnt show'd onLoad?

Is there anyway to send javascript code to jsoup? or should I use another library.

Thanks!

4

1 回答 1

0

You cannot execute javascript code with Jsoup. If you want to execute JS, use HTMLUnit

But if your javascript code sending some HTTP request to get some data(i.e. show more results), you can imitate this request and get responce data.

于 2012-04-21T11:35:46.730 回答