java - jsoup parse from website redirect -
i parsing url, have problem ajax load. when parse website show me body without response need body of elememt ticket_lists
. dont know how redirect on website working. tried debug js in debugger without success. using jsoup. possible?
thank you
connection.response response = jsoup.connect("https://jizdenky.studentagency.cz/booking/from/1763018002/to/10202038/tarif/regular/departure/20160711/retdep/20160711/return/false/ropen/false/credit/false/class/2") .method(connection.method.get) .execute(); map<string,string> cookies = response.cookies(); document doc = jsoup.connect("https://jizdenky.studentagency.cz/booking/from/1763018002/to/10202038/tarif/regular/departure/20160711/retdep/20160711/return/false/ropen/false/credit/false/class/2?1") .useragent("mozilla/5.0 (macintosh; intel mac os x 10_11_5) applewebkit/537.36 (khtml, gecko) chrome/51.0.2704.103 safari/537.36") .cookies(cookies) .get(); system.out.print(doc.body());
if open browser's developer tools, you'll see after requesting first page, browser redirected, , send (among other things) xhr
request (which ajax
):
response request contains information need.
check parameters browser sending , same.
Comments
Post a Comment