How to add proxy support to Jsoup?

前端 未结 7 1737
独厮守ぢ
独厮守ぢ 2020-11-28 03:47

I am a beginner to Java and my first task is to parse some 10,000 URLs and extract some info out of it, for this I am using Jsoup and it\'s working fine.

7条回答
  •  醉话见心
    2020-11-28 04:25

    You can easily set proxy

    System.setProperty("http.proxyHost", "192.168.5.1");
    System.setProperty("http.proxyPort", "1080");
    Document doc = Jsoup.connect("www.google.com").get();
    

提交回复
热议问题