• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Threezj
V2EX  ›  程序员

Android Volley post 页面时遇到的问题

  •  
  •   Threezj · Oct 10, 2015 · 2078 views
    This topic created in 3875 days ago, the information mentioned may be changed or developed.

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

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

    5 replies    2015-10-12 11:33:34 +08:00
    pubby
        1
    pubby  
       Oct 11, 2015 via Android
    想办法支持 cookie
    loshine1992
        2
    loshine1992  
       Oct 11, 2015
    推荐使用 Jsoup
    kaedea
        3
    kaedea  
       Oct 11, 2015
    HttpClient
    inmyfree
        4
    inmyfree  
       Oct 12, 2015
    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  
       Oct 12, 2015
    错了,一个地方没改,最后一个改为:

    RequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext(),mHttpStack );
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2596 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 15:52 · PVG 23:52 · LAX 08:52 · JFK 11:52
    ♥ Do have faith in what you're doing.