在各位老师的帮助下终于,成功了,谢谢,虽然很慢,但是毕竟成功了
CREATE CURSOR 大乐透 (红1 C(2), 红2 C(2), 红3 C(2),红4 C(2),红5 C(2),兰1 C(2),兰2 C(2),期号 C(5))
lcUrl = "https://webapi.
oHTTP=NEWOBJECT("MSXML2.XMLHTTP")
oHTTP.Open("GET", lcUrl, .F.)
oHTTP.SETREQUESTHEADER("Content-Type", "text/html;charset=UTF-8")
oHTTP.Send()
lcText = STRCONV(oHTTP.ResponseBody, 11)
lmText = STREXTRACT(lcText,'lotteryUnsortDrawresult":"','","matchList')
lyText = STREXTRACT(lcText,',"lotteryDrawNum":"','","lotteryDrawResult":"')
lstext = OCCURS("lotteryDrawNum", lcText)
? lmText ,lyText ,lstext
FOR lnj = 1 TO OCCURS("lotteryDrawNum", lcText)
lyText = STREXTRACT(lcText,',"lotteryDrawNum":"','","lotteryDrawResult":"', lnj)
lmText = STREXTRACT(lcText,'lotteryUnsortDrawresult":"','","matchList', lnj)
h1 = Substr(lmText ,1,2)
h2 = Substr(lmText ,4,2)
h3 = Substr(lmText ,7,2)
h4 = Substr(lmText ,10,2)
h5 = Substr(lmText ,13,2)
l1 = Substr(lmText ,16,2)
l2 = Substr(lmText ,19,2)
q1 = Substr(lyText ,1,5)
INSERT INTO 大乐透 VALUES (h1,h2,h3,h4,h5,l1,l2,q1)
ENDFOR
[此贴子已经被作者于2021-6-1 20:47编辑过]