January 22, 2018
JAVA: 抓取需要登录的页面, curl page with auth, How do I connect to a URL using Basic authentication?
ConnectToUrlUsingBasicAuthentication.java
package test;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import org.apache.commons.codec.binary.Base64;
public class ConnectToUrlUsingBasic… Read More