ZhengFangJiaoWuXiTong icon indicating copy to clipboard operation
ZhengFangJiaoWuXiTong copied to clipboard

能加QQ吗,有问题想问下363905547

Open lingtingSir opened this issue 8 years ago • 10 comments

课程请求无响应,请问现在你那里能正常得到课程的数据吗

lingtingSir avatar Mar 24 '16 01:03 lingtingSir

抓包看下,请求返回码是什么。

zqpmaster avatar Mar 24 '16 01:03 zqpmaster

姝g‘??url???逛?涓?涓?锛?浼?杩??荤????姝g‘??瀛??峰????瀛? Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: found (302)" UserInfo=0x7fe05ad39540 {com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x7fe05d1488c0> { URL: http://202.115.80.153/xskbcx.aspx?xh=3213123&xm=321321312&gnmkdm=N121603 } { status code: 302, headers {

"Cache-Control" = private;

"Content-Length" = 117;

"Content-Type" = "text/html; charset=gb2312";

Date = "Thu, 24 Mar 2016 01:48:10 GMT";

Location = "";

Server = "Microsoft-IIS/6.0";

"X-Aspnet-Version" = "1.1.4322";

"X-Powered-By" = "ASP.NET";

} }, NSErrorFailingURLKey=http://202.115.80.153/xskbcx.aspx?xh=123456&xm=213123&gnmkdm=N121603, com.alamofire.serialization.response.error.data=<3c68746d 6c3e3c68 6561643e 3c746974 6c653e4f 626a6563 74206d6f 7665643c 2f746974 6c653e3c 2f686561 643e3c62 6f64793e 0d0a3c68 323e4f62 6a656374 206d6f76 65642074 6f203c61 20687265 663d2727 3e686572 653c2f61 3e2e3c2f 68323e0d 0a3c2f62 6f64793e 3c2f6874 6d6c3e0d 0a>, NSLocalizedDescription=Request failed: found (302)}

lingtingSir avatar Mar 24 '16 01:03 lingtingSir

我记得课程请求的时候要带refer参数的。你在chrome里模拟请求看看浏览器的HTTP请求都带什么参数。

zqpmaster avatar Mar 24 '16 02:03 zqpmaster

你已经模拟登录了吗。要拿到cookie的。

zqpmaster avatar Mar 24 '16 02:03 zqpmaster

登录成功的

lingtingSir avatar Mar 24 '16 02:03 lingtingSir

参数:xh xm gnmkdm

lingtingSir avatar Mar 24 '16 02:03 lingtingSir

不是这个,看下请求头header里的参数。

zqpmaster avatar Mar 24 '16 02:03 zqpmaster

URL status Response Code protocol SSL Method Kept Alive Content-Type Client-Address Remote Address 没有refer

lingtingSir avatar Mar 24 '16 02:03 lingtingSir

我结合博客和源码在看了一遍,项目源码Cookies这一块是没有相关代码的,可以在上传一次比较完整的源码吗

lingtingSir avatar Mar 27 '16 02:03 lingtingSir