1
JSoup을 사용하여 페이지를 여는 중입니다. 내가 사용 www.google.com
및 인쇄 내용 같은 페이지를 열어 시도했다 :Jsoup이 (가) html 페이지를 열 수 없습니다.
Document doc = Jsoup.connect("http://www.google.com").get();
System.out.println(doc.text());
출력은 다음과 같습니다
Google Ricerca Immagini Video Mappe News Shopping Gmail Altro » iGoogle | Cronologia web | Impostazioni | Accedi Italia Ricerca avanzataStrumenti per le lingue PubblicitàSoluzioni AziendaliTutto su GoogleGoogle.com in English © 2012 - Privacy e Termini
내가 좋아하는 내 페이지를 열어보십시오 경우 :
http://www.mysite.com/test.php?link=http://www.myothersite.com/test/test1-/10968/try.html?params=65%253A12%257C66%253A2%257C39%253A6%257C72%253A5104&rt=nc&_dmd=1&id=p3286.c0.m14&_vc=1&x=11¶m1=p and d&sotto_categoria=_
내가 얻을 IOException
:
java.io.IOException: 400 error loading URL http://www.mysite.com/test.php?link=http://www.myothersite.com/test/test1-/10968/try.html?params=65%253A12%257C66%253A2%257C39%253A6%257C72%253A5104&rt=nc&_dmd=1&id=p3286.c0.m14&_vc=1&x=11¶m1=p and d&sotto_categoria=_
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:362)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:338)
at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:136)
at org.jsoup.helper.HttpConnection.get(HttpConnection.java:125)
무엇이 문제 일 수 있습니까? 누군가 나를 도울 수 있습니까?
감사로 대체 검색어 문자열에 검은 공간을 제거합니다. – NamingException