Java HTML Parsing a Page with Infinite Scroll -


how can grab page's html in java if page has infinite scroll? i'm grabbing page way:

url url = new url(stringurl); urlconnection con = url.openconnection(); inputstream in = con.getinputstream(); string encoding = con.getcontentencoding(); encoding = encoding == null ? "utf-8" : encoding; string html = ioutils.tostring(in, encoding); document document = jsoup.parse(html); 

but doesn't return of content associated infinite scroll section of page. how can trigger scrolling on html page jsoup document contains section?

infinite scroll describes technique page not contain content. javascript code runs in browser, sends request server addiional content , adds page. when scroll towards end of available content, javascript code repeats process: sends request , adds additional content.

therefore, need web browser javascript engine can run javascript code , produce events cause code load content.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -