【发布时间】:2014-03-05 00:15:52
【问题描述】:
我想使用 wget 或 curl 从http://eng.krx.co.kr/por_eng/m2/m2_1/m2_1_3/JHPENG02001_03.jsp?isu_cd=A005930(韩国证券交易所)获取 excel 文件。
本站的form标签如下图。
<div class="board">
<h3 class="item"></h3>
<!--
search
-->
<div class="search">
<form id="exKrx" onsubmit="return doSearch();" method="post" action="/por_eng/corelogic/process/m2/m2_1/m2_1_3/hpeng02001_03_01.xhtml?data-only=true" name="exKrx">
<fieldset>
<legend class="dpn"></legend>
<table summary="searching by conditions"></table>
<!--
body_head_btn
-->
<div class="body_head_btn">
<input class="image" type="image" onclick="doSearch(); return false;" alt="search" src="http://inc.krx.co.kr/image/eng/cm/btn/bt1ask.gif"></input>
<a title="Download" onclick="doExcel(); return false;" href="button.jsp">
<img alt="Download" src="http://inc.krx.co.kr/image/eng/cm/btn/bt1download.gif"></img>
</a>
</div>
<div class="infomenu"></div>
<!--
//body_head_btn
-->
</fieldset>
</form>
</div>
我尝试了类似的方法,但失败了。
wget -o ~/download/test.xls --post-data="se_key=TSIM5w+jLsm9LGMF0U4q1Q==" http://eng.krx.co.kr/por_kor/corelogic/process/m2/m2_1/m2_1_4/hpkor02001_04.xhtml?data-only=true
我该如何解决这个问题??
【问题讨论】:
-
如果相同,请在问题中使用eng.krx.co.kr,并列出您要下载的数据,以便其他人也可以尝试。我找不到您提到的确切 html 页面。
-
检查.. 在 chrome 浏览器 eng.krx.co.kr/por_eng/m2/m2_1/m2_1_3/… 和控制台中:grid.excelDownLoad("/por_eng");