原始地址:http://pricecheckindia.com/go/store/ebay/52440?ref=velusliv
的Java打印重定向的URL
重定向的URL:http://www.ebay.in/itm/Asus-Zenfone-6-A600CG-A601CG-White-16-GB-/111471688863?pt=IN_Mobile_Phones&aff_source=DA
我需要一個程序,將採取original url
並打印redirected url
。
如何在java中完成此操作。
public static void main(String[] args) throws IOException, InterruptedException
{
String url = "http://pricecheckindia.com/go/store/ebay/52440?ref=velusliv";
Response response = Jsoup.connect(url).followRedirects(false).execute();
System.out.println(response.url());
}
試圖jsoup的東西......但沒有得到它的權利 – 2014-09-26 17:47:54