0
我正在嘗試保存具有多邊形反饋鏈接的CSV文件。我目前有頭文件和cookie,但沒有用wget獲取csv文件。發送POST請求wget
這裏是頭:
http://pregame.com/sportsbook_spy/default.aspx
POST /sportsbook_spy/default.aspx HTTP/1.1
Host: pregame.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://pregame.com/sportsbook_spy/default.aspx
Cookie: Ccd=035ad31fe6ae4ecfa471cb7cb6f3a487b42fd4986df80e1a; Scd=0ad1b088c2c4b0097b3a7d3b32c34ec9d1585fde04336f0b; __utma=258943563.1458961190.1370891037.1370891037.1370970458.2; __utmz=258943563.1370891037.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=8%7C24; __utmb=258943563.8.10.1370970458; ASP.NET_SessionId=hzk5pwlo3y3kdwuuybcxoliq; AuthorizationCookie=6688A75D-8B99-4CD2-80C5-595236C99E47; __utmc=258943563
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 1092
__EVENTTARGET=ctl00%24content%24ctl00%24w_9613%24_fffffffff60c1bf9%24ctl00%24lbDownload&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUKMTgwNjUyODkwM2QYAQU%2BY3RsMDAkY29udGVudCRjdGwwMCR3Xzk2MTUkX2ZmZmZmZmZmZjYwYzFiZjkkY3RsMDAkZ3JkQ29tbWVudHMPPCsADAEIAgFk&ctl00%24header%24ctl00%24w_156%24_fffffffff60c1bf9%24ctl00%24Search1%24SearchText=&ctl00_header_ctl00_w_156__fffffffff60c1bf9_ctl00_Search1_filter=&ctl00%24content%24ctl00%24w_9613%24_fffffffff60c1bf9%24ctl00%24txtGameDt=06%2F11%2F2013&ctl00%24content%24ctl00%24w_9613%24_fffffffff60c1bf9%24ctl00%24hdnAllowDownload=1&ctl00%24content%24ctl00%24w_9613%24_fffffffff60c1bf9%24ctl00%24hfSport=all&ctl00%24content%24ctl00%24w_9613%24_fffffffff60c1bf9%24ctl00%24hfCal=0&ctl00%24content%24ctl00%24w_9615%24_fffffffff60c1bf9%24ctl00%24txtComment=&ctl00%24content%24ctl00%24w_9615%24_fffffffff60c1bf9%24ctl00%24hfParentId=0&ctl00%24content%24ctl00%24w_9615%24_fffffffff60c1bf9%24ctl00%24hfReplyId=0&ctl00%24content%24ctl00%24w_9615%24_fffffffff60c1bf9%24ctl00%24hfReportAbuse=0&ctl00%24content%24ctl00%24w_9615%24_fffffffff60c1bf9%24ctl00%24hfIsLoggedIn=0
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/csv; charset=utf-8
Content-Encoding: gzip
Expires: -1
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
x-frame-options: SAMEORIGIN
Telligent-Evolution: 6.1.9.30500
Content-Disposition: attachment; filename=GameInfo.csv
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 11 Jun 2013 17:41:01 GMT
----------------------------------------------------------
對於命令我使用
wget --load-cookies cookies.txt --post-file post-file http://pregame.com/sportsbook_spy/default.aspx
我如何用POST請求這個CSV文件?
我還是我剛開網頁的HTML,當我用捲曲-i -X POST http://pregame.com/sportsbook_spy/default。 aspx -H「Content-Type:text/csv」--data-binary「@postfile」 --data-binary (HTTP)此數據與指定的數據完全相同,沒有任何額外處理。 – rbur0425