最近在爬易查分的时候遇到了一些问题,来csdn上找方法,发现貌似都过时了,最后还是凭借意志力淦出来的
话不多说,直接上代码
import org.jsoup.nodes.Document;
import org.jsoup.Jsoup;
import java.util.Map;
import java.util.HashMap;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.select.Elements;
import org.jsoup.nodes.Element;
public class queryClass {
public static void main(String[] args) {
String userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A403 Safari/8536.25";
Map<String,String> body = new HashMap<>();
body.put("s_banji", "班级");
body.put("s_xingming", "姓名");
try {
Connection.Response res = Jsoup.connect("https://7445