|
我向百度云网盘上传了一个“测试文本.txt”,然后,想进行下载,肯定需要带上一些参数和cookie
并不能直接在linux下面用wget命令进行下载,
我们查看网络请求,找到下载地址,复制右击复制到curl
如下:
curl 'https://qdcu01.baidupcs.com/file/0f65f0b30e979e1db7607a6eef34de33?bkt=p3-14000f65f0b30e979e1db7607a6eef34de333702589e00000000000e&fid=3893484529-250528-15325213281329&time=1480655788&sign=FDTAXGERLBH-DCb740ccc5511e5e8fedcff06b081203-J%2FLz%2BmCqhe2BBMK791pu%2BBBr05I%3D&to=qdhb&fm=Yan,B,U,ny&sta_dx=14&sta_cs=&sta_ft=txt&sta_ct=0&sta_mt=0&fm2=Yangquan,B,U,ny&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=14000f65f0b30e979e1db7607a6eef34de333702589e00000000000e&sl=78774350&expires=8h&rt=pr&r=508432832&mlogid=7805616773579732714&vuk=3893484529&vbdid=393096943&fin=%E6%B5%8B%E8%AF%95%E6%96%87%E6%9C%AC.txt&fn=%E6%B5%8B%E8%AF%95%E6%96%87%E6%9C%AC.txt&slt=pm&uta=0&rtype=1&iv=0&isw=0&dp-logid=7805616773579732714&dp-callid=0.1.1&hps=1&csl=109&csign=zawS07Iu2CPhlmsYdPxXuvbKeGU%3D' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: zh-CN,zh;q=0.8' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Referer: https://pan.baidu.com/disk/home' -H 'Connection: keep-alive' --compressed
但是,这样并不行,我们要加一个参数。。如下:
curl 'https://qdcu01.baidupcs.com/file/0f65f0b30e979e1db7607a6eef34de33?bkt=p3-14000f65f0b30e979e1db7607a6eef34de333702589e00000000000e&fid=3893484529-250528-15325213281329&time=1480655788&sign=FDTAXGERLBH-DCb740ccc5511e5e8fedcff06b081203-J%2FLz%2BmCqhe2BBMK791pu%2BBBr05I%3D&to=qdhb&fm=Yan,B,U,ny&sta_dx=14&sta_cs=&sta_ft=txt&sta_ct=0&sta_mt=0&fm2=Yangquan,B,U,ny&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=14000f65f0b30e979e1db7607a6eef34de333702589e00000000000e&sl=78774350&expires=8h&rt=pr&r=508432832&mlogid=7805616773579732714&vuk=3893484529&vbdid=393096943&fin=%E6%B5%8B%E8%AF%95%E6%96%87%E6%9C%AC.txt&fn=%E6%B5%8B%E8%AF%95%E6%96%87%E6%9C%AC.txt&slt=pm&uta=0&rtype=1&iv=0&isw=0&dp-logid=7805616773579732714&dp-callid=0.1.1&hps=1&csl=109&csign=zawS07Iu2CPhlmsYdPxXuvbKeGU%3D' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: zh-CN,zh;q=0.8' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Referer: https://pan.baidu.com/disk/home' -H 'Connection: keep-alive' --compressed -o 1.txt
-o/--output 把输出写到该文件中
|
上一篇:.net/c# List集合复制克隆下一篇:iPhone 6s 免费更换电池查询工具
|