该网页必须登陆才能查询 无验证码
public static void main(String[] args) throws IOException {
//获取 Cookies
Connection.Response res = Jsoup.connect("https://马赛克 /Login.do")
.data("userID","马赛克","password","马赛克")
.method(Connection.Method.POST)
.execute();
Map<String,String> cookiesMap =res.cookies();
//带 Cookies 查询
Document document = Jsoup.connect("https://马赛克 /KeySearcherAction.do")
.data("location","马赛克")
.cookies(cookiesMap).post();
System.out.println(document.body().tagName("tbody").tagName("tr").tagName("td"));
}
但是带上 Cookies 后页面依然提示
The session carried out the timeout or unjust page changes were performed.
我用 POSTMAN 挂上 Cookies 也是如此
unjust page changes were performed 这句话是非法行为的意思?
求助 感谢!
1
matepi 2020-01-03 12:44:19 +08:00 via iPhone
抓包比对
|
2
fmumu 2020-01-03 16:29:29 +08:00 via Android
请求头之类的看看
|