Jsoup runtime and debug behaviour is different?

56 views Asked by At

What code I use:

Connection conn = Jsoup.connect("https://e-disclosure.ru"); 
Document doc = conn.get(); 
String html = doc.html();

When I debug it in Eclipse, everything works fine, but when I run it outside ('java -jar...') I receive absolutely different data in the 'html' variable. Looks like some scripts were not executed (yes, maybe they should not, but in the debug mode it works!) or the server returned different data (but why? the address is the same, the headers are the same...). Can somebody explain it?

I expected the same behaviour for the code. I tried to check connection settings made by Jsoup by default, but it was the same (for example, user agent). The address is also unchanged.

0

There are 0 answers