V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Threezj
V2EX  ›  程序员

Android Volley post 页面时遇到的问题

  •  
  •   Threezj · 2015-10-10 23:33:12 +08:00 · 1669 次点击
    这是一个创建于 3134 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我想爬下我们学校网站的选课

    但是网站登陆是分两个页面的, 一个页面输账号,一个页面输密码,这应该如何模拟登陆

    5 条回复    2015-10-12 11:33:34 +08:00
    pubby
        1
    pubby  
       2015-10-11 01:05:14 +08:00 via Android
    想办法支持 cookie
    loshine1992
        2
    loshine1992  
       2015-10-11 09:35:59 +08:00
    推荐使用 Jsoup
    kaedea
        3
    kaedea  
       2015-10-11 12:27:33 +08:00
    HttpClient
    inmyfree
        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());
    inmyfree
        5
    inmyfree  
       2015-10-12 11:33:34 +08:00
    错了,一个地方没改,最后一个改为:

    RequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext(),mHttpStack );
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5889 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 01:35 · PVG 09:35 · LAX 18:35 · JFK 21:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.