Home > Software engineering >  Lottery network data, how to obtain?
Lottery network data, how to obtain?

Time:09-15

http://www.cwl.gov.cn/kjxx/ssq/kjgg/

The following is the data you need:


VB how to get the data?
XMLHTPP, take less than the data,

CodePudding user response:

Javascript can be analyzed, but can be by internetexplorer application/webbrowser documentcomplete to analyze elements.
Here to give you a VBS script, by processing internetexplorer. The application of the documentcomplete to obtain the content of the web page:
 
The Set ie=wscript. Createobject (" internetexplorer. Application ", "ie_")
Ie. Navigate "http://www.cwl.gov.cn/kjxx/ssq/kjgg/"

BQuit=False
While Not bquit
Wscript. Sleep 1000
Wend

Sub ie_DocumentComplete (ByVal pdisp, ByRef url)
If the url="http://www.cwl.gov.cn/kjxx/ssq/kjgg/" Then
The Set colElems=pdisp. Document. Getelementsbytagname (" span ")
For Each elem In colelems
If elem. Classname="rq1" Then
Result=result & amp; Elem. The innertext & amp; ", "
End the If
Next
Msgbox result
Bquit=True
End the If
End Sub

Run the example:

Download address:
Link: https://pan.baidu.com/s/1Mp-3mbhG4ju2yXLMaTmFMA
The extracted code: vuom
  • Related