java net.UnknownHostException錯誤

這個問題是請求,重定向了,跟入源碼。修改了地址,變成302html

                Connection connect = Jsoup.connect(url);
	        connect.header("Host", "http://info.bet007.com");
	        connect.header("User-Agent", "  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0");
	        connect.header("Accept", "  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
	        connect.header("Accept-Language", "zh-cn,zh;q=0.5");
	        connect.header("Accept-Charset", "  GB2312,utf-8;q=0.7,*;q=0.7");
	        connect.header("Connection", "keep-alive");
			
	        Document doc = connect.get();

  就能夠獲取到手機歸屬地了java

相關文章
相關標籤/搜索