有這么一批百度云私密鏈接需要監(jiān)控,定時(shí)查看是否掛擋了,請(qǐng)求的時(shí)候有個(gè)問(wèn)題,百度云私密鏈接,比如http://pan.baidu.com/s/1o7QhUps,它在請(qǐng)求過(guò)程中還會(huì)進(jìn)行302跳轉(zhuǎn),跳轉(zhuǎn)到http://pan.baidu.com/share/init?shareid=3900055188&uk=1100738292,因此我寫(xiě)了這么個(gè)程序 HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://pan.baidu.com/s/1o7QhUps/");
req.Method = "Get";
req.Accept = "text/html";
HttpWebResponse myResp = (HttpWebResponse)req.GetResponse(); if (myResp.StatusCode == HttpStatusCode.Redirect)
{ Console.WriteLine("redirected to:" + myResp.GetResponseHeader("Location")); }現(xiàn)在問(wèn)題就是在請(qǐng)求如http://pan.baidu.com/s/1o7QhUps 這種類(lèi)型的鏈接后,直接返回遠(yuǎn)程服務(wù)器返回錯(cuò)誤: (403) 已禁止,而訪(fǎng)問(wèn)http://pan.baidu.com/share/init?shareid=3900055188&uk=1100738292這種就沒(méi)事
- 1 回答
- 0 關(guān)注
- 738 瀏覽
添加回答
舉報(bào)
0/150
提交
取消