jsoup- 搜索表单的 URL 在 post() 中没有改变

jsoup- Search Form's URL not changing in post()

我正在开发网络爬虫。 我需要在表单的输入字段中插入一些值(用于搜索)并以编程方式获取结果。表单有一个 post 方法,动作值为 "/SetReviewFilter#REVIEWS"
但问题是,当我手动从网站进行搜索时,网站的 URL 没有改变。
我认为该网页是自 posting Here the link of the Webpage

我不知道如何实现 this.But 我试过了

private Document getReviewSearchDocument(Document search,String search_url)
    {
//search_url mean the url of that search document I fetched previously
// search means the current document of the webpage

    Element input = search.getElementsByClass("ratings_and_types").first();
        Element link = input.select("div:nth-child(1) > form ").first();
        Document rdocument= null;

        if (link !=null) {
            System.out.println("form found! on: "+link_value);
        } else {
            System.out.println("Form not found");
        }
        Connection connection = Jsoup.connect(search_url + "/SetReviewFilter#REVIEWS").timeout(30 * 1000).ignoreContentType(true).ignoreHttpErrors(true);
        try {
            Connection.Response resp = connection.execute();

            if (resp.statusCode() ==200) {

                rdocument = connection.data("q",this.keywords).userAgent("Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36").execute().parse();
                System.out.println("Success: "+ resp.statusCode());
                System.out.println("document: "+ rdocument.text().toString());
            }
            else{
                System.out.println("no search match");
            }



        } catch (IOException e) {
            e.printStackTrace();
        }




        return rdocument;
    }

如果有人对此有任何想法,请分享。
谢谢。

我尝试了几种替代方法并修改了我的代码以调用 JSOUP POST 请求 来获得这份工作 done.But 由于cookies.I 的问题发现,对于这个单个 post 请求,它需要将近 50 个 cookie(感谢 Chrome 控制台)。有些 cookie 我无法自己填充,因为这些 cookie 是链接到不同的网站(例如:facebook)。最糟糕的情况是我必须根据每个 city.So 的酒店数量提出此请求,有时它可能高达 85 000,因此这将是一个昂贵的过程。 (对我来说是 -5,因为我没有看到它的到来)

我在 Java.And 中使用 Selenium 通过 Web 自动化重建项目,在表单中搜索变得如此简单。
谢谢!