论坛首页 Web前端技术论坛

科比:你是信仰,亦是青春

浏览 1633 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2021-05-18  
这几天刷到很多科比入选名人堂的消息,我相信有很多的科比的球迷看到这个会很激动,很多人喜欢科比球风和“曼巴精神”。转眼科比离开已经一年多了,刷到他的信息依然很难过,曾经多少人把他当做人生的信仰,多少人的青春亦是他。陪伴很多人整个青春的人不在了。今天我们就通过数据来回顾下科比那些辉煌的历史。数据来源于https://www.basketball-reference.com/players/b/bryanko01.html。
完成的代码示例
import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.methods.GetMethod;
import java.io.IOException;
public class Main {
    # 代理服务器(产品官网 www.16yun.cn)
    private static final String PROXY_HOST = "t.16yun.cn";
    private static final int PROXY_PORT = 31111;
    public static void main(String[] args) {
        HttpClient client = new HttpClient();
        HttpMethod method = new GetMethod("https://httpbin.org/ip");
        HostConfiguration config = client.getHostConfiguration();
        config.setProxy(PROXY_HOST, PROXY_PORT);
        client.getParams().setAuthenticationPreemptive(true);
        String username = "16ABCCKJ";
        String password = "712323";
        Credentials credentials = new UsernamePasswordCredentials(username, password);
        AuthScope authScope = new AuthScope(PROXY_HOST, PROXY_PORT);
        client.getState().setProxyCredentials(authScope, credentials);
        try {
            client.executeMethod(method);
            if (method.getStatusCode() == HttpStatus.SC_OK) {
                String response = method.getResponseBodyAsString();
                System.out.println("Response = " + response);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            method.releaseConnection();
        }
    }
}
HttpClient4.x
JSoup
JSoup全局代理
Connection
Htmlunit
Okhttp
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics