老师,我模仿试着做一下,只能下载一页的,怎么把全的下载来呢?谢谢
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),球具 C(1))
lcUrl = "https://webapi.
oHTTP=NEWOBJECT("MSXML2.XMLHTTP")
oHTTP.Open("GET", lcUrl, .F.)
oHTTP.SETREQUESTHEADER("Content-Type", "text/html;charset=UTF-8")
oHTTP.Send()
lcText = oHTTP.ResponseText
t1 = SECONDS()
FOR lnj = 1 TO OCCURS("lotteryDrawNum", lcText)
lyText = STREXTRACT(lcText,',"lotteryDrawNum":"','"', lnj)
qjtext = STREXTRACT(lcText,',"lotteryEquipmentCount":' ,',"', lnj)
lmText = STREXTRACT(lcText,'lotteryUnsortDrawresult":"','"', 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)
INSERT INTO 大乐透 VALUES (h1,h2,h3,h4,h5,l1,l2,lyText,qjtext)
ENDFOR
? SECONDS() - t1