Java 使用Jsoup进行Web抓取,无法获取搜索结果

Java 使用Jsoup进行Web抓取,无法获取搜索结果,java,jsoup,Java,Jsoup,我正试图从网站上抓取捐赠者名单,但无法获得搜索结果页面。谁能看看我的代码,看看有什么问题吗 Connection.Response Form = Jsoup.connect(URL) .method(Connection.Method.GET) .userAgent(USER_AGENT) .execute(); Document Doc = Form.parse(); HashMap<Str

我正试图从网站上抓取捐赠者名单,但无法获得搜索结果页面。谁能看看我的代码,看看有什么问题吗

        Connection.Response Form = Jsoup.connect(URL)
        .method(Connection.Method.GET)
        .userAgent(USER_AGENT)
        .execute();
        Document Doc = Form.parse();

        HashMap<String, String> cookies = new HashMap<>(Form.cookies());

        HashMap<String, String> searchData = new HashMap<>();
        searchData.put("dpBloodGroup", "O+");
        searchData.put("dpCountry", "1|dpCountry");
        searchData.put("dpState", "4|dpState");
        searchData.put("dpDistrict", "0|dpDistrict");
        searchData.put("dpCity", "0|dpCity");
        searchData.put("btnSearchButton", "Submit");

        Connection.Response result = Jsoup.connect(URL)
                .cookies(cookies)
                .data(searchData)
                .method(Connection.Method.POST)
                .userAgent(USER_AGENT)
                .execute();

        System.out.println(result.parse().html());
Connection.Response Form=Jsoup.connect(URL)
.method(Connection.method.GET)
.userAgent(USER\u AGENT)
.execute();
Document Doc=Form.parse();
HashMap cookies=新的HashMap(Form.cookies());
HashMap searchData=新HashMap();
searchData.put(“dpBloodGroup”,“O+”);
searchData.put(“dpCountry”、“1 | dpCountry”);
searchData.put(“dpState”,“4 | dpState”);
searchData.put(“dpDistrict”、“0 | dpDistrict”);
searchData.put(“dpCity”,“0 | dpCity”);
searchData.put(“btnSearchButton”、“Submit”);
Connection.Response result=Jsoup.connect(URL)
.饼干(饼干)
.数据(搜索数据)
.method(Connection.method.POST)
.userAgent(USER\u AGENT)
.execute();
System.out.println(result.parse().html());