91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.64MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2023-08-15
  • 語言: 其他
  • 標簽: 教務系統??

資源簡介

正方教務系統數據抓取(含驗證碼識別),模擬登錄,抓取課表,考試成績,考試安排,個人信息。并且提供了Json Api接口可供客戶端調用。

資源截圖

代碼片段和文件信息

package?com.nami;

import?java.util.ArrayList;
import?java.util.List;

import?org.apache.http.HttpResponse;
import?org.apache.http.NameValuePair;
import?org.apache.http.client.entity.UrlEncodedFormEntity;
import?org.apache.http.client.methods.HttpPost;
import?org.apache.http.impl.client.CloseableHttpClient;
import?org.apache.http.impl.client.HttpClients;
import?org.apache.http.message.BasicNameValuePair;
import?org.apache.http.util.EntityUtils;

public?class?Test?{
public?static?void?post(String?usernumber?String?pwd?String?role)?{
CloseableHttpClient?httpclient?=?HttpClients.createDefault();
HttpPost?httppost?=?new?HttpPost(“http://localhost:8080/WhxyJw/baseServlet/JsonOutLogin“);
HttpResponse?response?=?null;
List?params?=?new?ArrayList();
params.add(new?BasicNameValuePair(“usernumber“?usernumber));
params.add(new?BasicNameValuePair(“pwd“?pwd));
params.add(new?BasicNameValuePair(“role“?role));
try?{
httppost.setEntity(new?UrlEncodedFormEntity(params));
response?=?httpclient.execute(httppost);
System.out.println(“接口:“+?response.getStatusLine().toString());
if(“HTTP/1.1?200?OK“.equals(response.getStatusLine().toString())){
String?result?=?EntityUtils.toString(response.getEntity()?“utf-8“);
System.out.println(result);
}
}?catch?(Exception?e)?{
e.printStackTrace();
}
}

public?static?void?postGrade(String?username?String?usernumber?String?urlcode?
String?ddlXN?String?ddlXQ?String?btn_zcj)?{
CloseableHttpClient?httpclient?=?HttpClients.createDefault();
HttpPost?httppost?=?new?HttpPost(“http://localhost:8080/WhxyJw/JwServlet/JsonOutGrade“);
HttpResponse?response?=?null;
List?params?=?new?ArrayList();
params.add(new?BasicNameValuePair(“username“?username));
params.add(new?BasicNameValuePair(“usernumber“?usernumber));
params.add(new?BasicNameValuePair(“urlcode“?urlcode));
params.add(new?BasicNameValuePair(“ddlXN“?ddlXN));
params.add(new?BasicNameValuePair(“ddlXQ“?ddlXQ));
params.add(new?BasicNameValuePair(“btn_zcj“?btn_zcj));
try?{
httppost.setEntity(new?UrlEncodedFormEntity(params));
response?=?httpclient.execute(httppost);
//System.out.println(“接口:“+?response.getStatusLine().toString());
if(“HTTP/1.1?200?OK“.equals(response.getStatusLine().toString())){
String?result?=?EntityUtils.toString(response.getEntity()?“utf-8“);
System.out.println(result);
}
}?catch?(Exception?e)?{
e.printStackTrace();
}
}

public?static?void?postTimetable(String?username?String?usernumber?String?urlcode)?{
CloseableHttpClient?httpclient?=?HttpClients.createDefault();
HttpPost?httppost?=?new?HttpPost(“http://localhost:8080/WhxyJw/JwServlet/JsonOutTimetable“);
HttpResponse?response?=?null;
List?params?=?new?ArrayList();
params.add(new?BasicNameValuePair(“username“?username));
params.a

評論

共有 條評論