gpt4 book ai didi

java - 使用 Java 发布到网站,导航经过 'i agree' 重定向

转载 作者:行者123 更新时间:2023-12-01 05:42:02 27 4
gpt4 key购买 nike

我正在尝试访问一个网站,并获取要处理的请求以遵循重定向。我访问了“我同意”网站,但它似乎没有继续下去,并且不断重定向我

这是我的代码:

public static void main(String[] args)
{
System.out.println("results");
//String targetConfirmation18 = "";

URL url;
HttpURLConnection connection;
OutputStreamWriter osw = null;
BufferedReader br = null;
String line;

try {
url = new URL("");
//url = new URL(targetConfirmation);
connection = (HttpURLConnection)url.openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
osw = new OutputStreamWriter(connection.getOutputStream());
osw.write("");
osw.flush();

br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
while ((line = br.readLine()) != null) {
System.out.println(line);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
br.close();
} catch (IOException ioe) {
// nothing to see here
}
}
}

最佳答案

我怀疑您违反了Tabcorp Terms of Service 。他们说:

You may, using an industry-standard web browser, download and view the Content for your personal, non-commercial use only.

All rights not expressly granted herein are reserved.

关于java - 使用 Java 发布到网站,导航经过 'i agree' 重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6887736/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com