javascript - 如何从 zippyshare 下载 bash?

标签 javascript bash curl download wget

<分区>

谁能帮助我如何使用 bash(带有 CentOS 的服务器)从 zippyshare.com 下载文件? 他们的下载按钮是用 flash 制作的,所以我无法检索下载链接。

最佳答案

这绝对是可能的,但它有点 hacky。我已经使用 wget 自己做了很长一段时间。诀窍是让服务器认为请求是从浏览器发出的,要实现这一点,您需要做一些事情:

  • 下载链接(文件的实际链接)
  • Link Referrer(带有下载按钮的网页)
  • Zippyshare session ID(在 Cookie 中找到)

这是一个屏幕截图,解释了您可以获得每个项目的位置:

Download From Zippyshare

现在打开您的终端,并使用以下命令(替换必要的项目):

wget <download_link> \
--referer='<referrer>' \
--cookies=off --header "Cookie: JSESSIONID=<session_id>" \
--user-agent='Mozilla/5.0 (Windows NT 6.0) Gecko/20100101 Firefox/14.0.1'

示例:

wget http://www16.zippyshare.com/d/29887835/8895183/hello.txt \
--referer='http://www16.zippyshare.com/v/29887835/file.html' \
--cookies=off --header "Cookie: JSESSIONID=26458C0893BF69F88EB5743D74FE0F8C" \
--user-agent='Mozilla/5.0 (Windows NT 6.0) Gecko/20100101 Firefox/14.0.1'

原始答案:How to use wget to download from hosting sites?

注意:在命令中,实际上是'referer'而不是'referrer'

关于javascript - 如何从 zippyshare 下载 bash?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9342359/

相关文章:

javascript - 使用tinySort限制Child div?

javascript - Google Maps API v3 : Geocoding Reversal, 仅打印出一个标记(javascript)

regex - 如何在 Bash 中测试变量是否符合指定格式?

linux - 在 Bash 中提取部分字符串

php - 创建 PHP API : Checking from which server the API Request comes from

curl - 使用共享 URL (AuthKey) 通过 API 访问 Google Doc?

php - 在 XML 页面上使用 cURL 或 Pear (PHP) 的 HTTP_Request

javascript - 单击提交按钮后页面会重新加载

javascript - TypeError : this. state.users.map 不是函数 reactjs

bash - 在 docker 容器中安装 openssh-server、g++、gdb 和 gdbserver |用于 Linux 开发的 Visual C++ + Docker