我想爬下我们学校网站的选课
但是网站登陆是分两个页面的, 一个页面输账号,一个页面输密码,这应该如何模拟登陆
1
pubby 2015-10-11 01:05:14 +08:00 via Android
想办法支持 cookie
|
2
loshine1992 2015-10-11 09:35:59 +08:00
推荐使用 Jsoup
|
3
kaedea 2015-10-11 12:27:33 +08:00
HttpClient
|
4
inmyfree 2015-10-12 11:32:44 +08:00
DefaultHttpClient httpclient = new DefaultHttpClient();
CookieStore cookieStore = new BasicCookieStore(); httpclient.setCookieStore(cookieStore); HttpClientStack mHttpStack = new HttpClientStack( httpclient); RequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext(),NotesApp.getmHttpStack()); |
5
inmyfree 2015-10-12 11:33:34 +08:00
错了,一个地方没改,最后一个改为:
RequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext(),mHttpStack ); |