momo zone

调核人的blog

解决linux下百度网盘资源下载慢

最新发现使用wget和axel 不能下载百度网盘的资源了,或者就是前几秒有速度,但很快就降为0,但用浏览器正常。我想差别就在于http请求头了,我在wget 增加agent和referer参数后就ok了:

wget -U "Mozilla/5.0  AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36" --referer="http://pan.baidu.com/share/link?shareid=3046341&uk=2016435"

agent必须是有效的,baidu会进行一些正则匹配。referer只要是http://pan.baidu.com/share/link? 好像都可以

如果要进行多线程下载就要用axel了,同样也要增加参数:

axel -a -U "Mozilla/5.0  AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36" -n5 "http://nj.baidupcs.com/file/55abd3c198?fid=6397616-28-28010738&time=1403030&fn=abc.zip"  -H Referer:"http://pan.baidu.com/share/link?shareid=3046341&uk=2016435"

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: