[AHK]获取新股信息

来源:互联网 发布:淘宝app官方下载6.9 编辑:程序博客网 时间:2024/04/30 11:20
;作者:sunwind;日期:2016年11月28日23:19:11;功能:从同花顺网站获取当日新股信息#SingleInstance,forceurl=http://data.10jqka.com.cn/ipo/xgsgyzq/whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")whr.Open("GET", url, true)whr.Send()whr.WaitForResponse()str:=whr.ResponseTexti:=0,arr:={}Loop,Parse,str,`n{     IfInString,A_LoopField,<td class=" c_red">    {        arr[i]:=A_LoopField        i:=i+1    }    }arr_out:={}for key,val in arr{    j:=mod(key,12)+1    k:=key//12+1    StringReplace,val,val,<td class=" c_red">,    StringReplace,val,val,</td>,    val:=Trim(val)    arr_out[k,j]:=val}MsgBox  % arr_out[1].9 "新股:`n" . ArrayToString(arr_out)return ArrayToString(items ){str := ""cnt:=items.MaxIndex()for each, item in items    str .= item[1] ((A_Index == cnt) ? "" : "|")return str}

0 0