我正在尝试抓取一个网站,通过点击按钮返回一个要下载的文件。我正在尝试使用Chrome调试工具来获取此功能,并且无法弄清楚如何恢复POST操作后面的真实网址:
请求标题:
POST /download.php HTTP/1.1
Host: www.rmdown.com
Connection: keep-alive
Content-Length: 385
Cache-Control: no-cache
Pragma: no-cache
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Origin: http://www.rmdown.com
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryeqA3pQupG0ndfLMZ
Referer: http://www.rmdown.com/link.php?hash=1333f4f84bb41d5adc0f61e8f5a4658460da70b2737
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4
请求有效负载:
------WebKitFormBoundaryeqA3pQupG0ndfLMZ
Content-Disposition: form-data; name="ref"
1333f4f84bb41d5adc0f61e8f5a4658460da70b2737
------WebKitFormBoundaryeqA3pQupG0ndfLMZ
Content-Disposition: form-data; name="reff"
MTM3OTQ4NzQwMQ==
------WebKitFormBoundaryeqA3pQupG0ndfLMZ
Content-Disposition: form-data; name="submit"
download
------WebKitFormBoundaryeqA3pQupG0ndfLMZ--
响应标头
HTTP/1.1 200 OK
Date: Wed, 18 Sep 2013 07:35:53 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Content-Disposition: attachment; filename="3f4f84bb41d5adc0f61e8f5a4658460da70b2737.torrent"
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 43428
Connection: close
Content-Type: application/force-download
有什么想法吗?
答案 0 :(得分:2)
您向(http://www.rmdown.com/download.php
)发出POST请求的网址是真实网址。
服务器如何确定响应对该URL的POST请求的内容,该请求位于服务器内部且对客户端不透明。
可能性包括: