简体   繁体   中英

Jsoup in Google App Engine

I have used Jsoup Library to extract html from different sites. Jsoup Post to be Precised. When i use it locally ie in java dynamic web application it runs perfectly fine. But when i try to run on google app engine , it doesnot give required and expected data that i get when i run the program locally.

I use the below code to get the PNR status of the train. It works fine locally. In google app engine it doesnot return the required data

doc=Jsoup.connect("http://www.indianrail.gov.in/cgi_bin/inet_pnrstat_cgi.cgi").timeout(300000)
                    .data("lccp_pnrno1",fullpnr).post();

Ah , still i was not able to figure it out , but i am getting the result when the application is deployed and is up and running.

I am not getting the result when i run the code locally as a google app engine web application .I used GAE plugin for eclipse. Dont know what the issue is.But it runs when it is deployed so it does solve my problem in a way. :)

Thanks

here is the link to test : http://train-inquiry.appspot.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM