求助:如何将网上的表格内容下载下来?谢谢!
网址:http://data.,这个版面上的‘分红送配详细列表’的数据想要下载下来,其他的不用了,如何写代码?我一点不会,求大家帮帮忙吧!谢谢!
* VFP9 代码 CREATE CURSOR 分红送配 (报告期 C(10), 业绩披露日期 C(10), 送转总比例 N(6,1), 送股比例 N(6,1), 转股比例 N(6,1), 现金分红比例 C(50), 股息率_% N(6, 2),; 每股收益_元 N(6,2), 每股净资产_元 N(6,2), 每股公股金_元 N(6,2), 每股未分配利润_元 N(6,2), 净利润同比增长_% N(6, 2), 总股本_亿 N(6,1),; 预案公告日 C(10), 股权登记日 C(10), 除权除息日 C(12), 方案进度 C(20), 最新公告日期 C(10)) oHTTP=NEWOBJECT("MSXML2.XMLHTTP") TEXT TO cUrl NOSHOW TEXTMERGE http://dcfm./EM_MutiSvcExpandInterface/api/js/get?callback=jQuery112305016151387317396_1620197753903&st=ReportingPeriod&sr=-1&ps=50&p=1&type=DCSOBS&js=%7B%22data%22%3A(x)%2C%22pages%22%3A(tp)%7D&cmd=000001&token=894050c76af8597a853f5b408b759f5d ENDTEXT lcFld = "ReportingPeriod,ResultsbyDate,SZZBL,SGBL,ZGBL,AllocationPlan,GXL,EarningsPerShare,NetAssetsPerShare,MGGJJ,MGWFPLY,JLYTBZZ,TotalEquity,YAGGR,GQDJR,CQCXR,ProjectProgress,NOTICEDATE" ALINES(laFld, lcFld, ",") oHTTP.Open("GET", cUrl, .F.) oHTTP.Send() lcText = STRCONV(STRCONV(oHTTP.ResponseBody, 11),2) lcText = STREXTRACT(lcText, '[{"', '}]') FOR lnJ = 1 TO ALINES(laText, lcText, '},{"') APPEND BLANK FOR lnK = 1 TO ALINES(laStr, laText[lnJ], '":', ',"') STEP 2 IF ASCAN(laFld, laStr[lnK]) = 0 LOOP ENDIF DO CASE CASE laStr[lnK] == "ReportingPeriod" REPLACE 报告期 WITH &laStr[lnK + 1] CASE laStr[lnK] == "ResultsbyDate" REPLACE 业绩披露日期 WITH &laStr[lnK + 1] CASE laStr[lnK] == "SGBL" REPLACE 送股比例 WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1]) CASE laStr[lnK] == "ZGBL" REPLACE 转股比例 WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1]) , 送转总比例 WITH 送股比例 + 转股比例 CASE laStr[lnK] == "AllocationPlan" REPLACE 现金分红比例 WITH &laStr[lnK + 1] CASE laStr[lnK] == "GXL" REPLACE 股息率_% WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1] * 100) CASE laStr[lnK] == "EarningsPerShare" REPLACE 每股收益_元 WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1]) CASE laStr[lnK] == "NetAssetsPerShare" REPLACE 每股净资产_元 WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1]) CASE laStr[lnK] == "MGGJJ" REPLACE 每股公股金_元 WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1]) CASE laStr[lnK] == "MGWFPLY" REPLACE 每股未分配利润_元 WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1]) CASE laStr[lnK] == "JLYTBZZ" REPLACE 净利润同比增长_% WITH IIF(VARTYPE(&laStr[lnK + 1]) == "C", 0, &laStr[lnK + 1]) CASE laStr[lnK] == "TotalEquity" REPLACE 总股本_亿 WITH &laStr[lnK + 1]/10^8 CASE laStr[lnK] == "YAGGR" REPLACE 预案公告日 WITH &laStr[lnK + 1] CASE laStr[lnK] == "GQDJR" REPLACE 股权登记日 WITH &laStr[lnK + 1] CASE laStr[lnK] == "CQCXR" REPLACE 除权除息日 WITH &laStr[lnK + 1] CASE laStr[lnK] == "ProjectProgress" REPLACE 方案进度 WITH &laStr[lnK + 1] CASE laStr[lnK] == "NOTICEDATE" REPLACE 最新公告日期 WITH &laStr[lnK + 1] ENDCASE ENDFOR ENDFOR BROWSE