1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| Sub Go_Traitement_Msxml2XMLHTTP()
sirens = Array(813023868, 813156973, 813157476, 813622552, 813837507, 813986635, 814095113, 814279881, 814406989, 817727571, 818756991, 818993800, 819058124, 819130758, 819132135, 819253956, 886180694, 950516047, 957504061, 962227351)
Dim i, j, k, l, elements, SP As String
Dim htmlTabElement() As IHTMLElement
Dim GenericElem As HTMLGenericElement
Dim MyTags
Dim MonDiv As HTMLDivElement
Dim VERIF_siren
' selection des contacts
Dim URLSTE, Titre As String, donnée_brut, donnée_propre
' Set MyXMLHttp = CreateObject("Microsoft.XMLHTTP")
Set MyXMLHttp = CreateObject("Msxml2.XMLHTTP")
Dim t0 As Double
t0 = Time
verrouEvent = True
For Each contact In sirens
mySIREN = contact
URL$ = "https://www.ellisphere.fr/entreprise/" & mySIREN
With MyXMLHttp
.Open "get", URL, False
.setRequestHeader "DNT", "1"
On Error Resume Next
.send
On Error GoTo 0
If .Status = 200 Then
SP = .responseText
' If InStr(1, SP, "app.entreprise = app.entreprise || {};", vbTextCompare) Then
' 'Call EXTRACT_DONNEES(SP)
' Call EXTRACT_DONNEES_JSON_Contacts(SP, contact)
' End If
End If
End With
On Error GoTo 0
suivant:
Next contact
Debug.Print "Msxml2XMLHTTP" & vbTab & UBound(sirens) & vbTab & CStr(Time - t0)
MsgBox CStr(Time - t0)
End Sub |
Partager