01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
|
public
void
handResponse(MyHttpResponse myHttpResponse) {
Document doc;
if
(myHttpResponse.getPipIndex() == NetConstant.HOMEPAGE) {
doc = myHttpResponse.getData();
Elements hidden_inputs = doc.select(
"input[type=hidden]"
);
for
(Element ele : hidden_inputs) {
String[] arr =
new
String[] {
ele.attr(
"name"
), ele.attr(
"value"
)
};
Globe.sHideParams.add(arr);
}
hidden_inputs = doc.select(
"input[type=submit]"
);
Globe.sHideParams.add(
new
String[] {
hidden_inputs.get(
0
).attr(
"name"
), hidden_inputs.get(
0
).attr(
"value"
)
});
System.out.println(
"获取首页信息成功"
);
// System.out.println(doc);
}
}
|
01
02
03
04
05
06
07
08
09
10
|
if
(req.getPipIndex() == NetConstant.LOGIN) {
CookieStore store = client.getCookieStore();
List<Cookie> cookies = store.getCookies();
if
(cookies.isEmpty()) {
}
else
{
mCookie = cookies.get(
0
);
mCookieString = mCookie.getName() +
"="
+ mCookie.getValue();
}
}
|