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
|
ID= "GSZ:FP"
Set oHttp = CreateObject("MSXML2.XMLHTTP")
oHttp.Open "GET", "http://www.bloomberg.com/quote/GSZ:FP", False
oHttp.send
texto= oHttp.responseText
Set oHttp = Nothing
divo=split(texto,"<span class="" price"">")(1)
texte=split(divo,"</span>")(0)
texte="<span class="" price"">" & texte & "</span>" & "</span>"
divo2=split(texto, "<p class=""fine_print"">")(1)
texte2=split(divo2,"</p>")(0)
texte2="<p class=""fine_print"">"& texte2 &"</p>"
With CreateObject("htmlfile")
.write texte & vbcrlf & texte2
For Each elem In .all
If elem.classname = " price" Then
valeur=split(elem.innertext," ")(0)
devise=split(elem.innertext," ")(1)
elseif elem.classname="fine_print"then
madate=replace (split(elem.innertext,"on ")(1),".","")
end if
next
end with
msgbox valeur & vbcrlf & devise & vbcrlf & madate |
Partager