1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Dim compte%
Private Sub Command1_Click()
navigue ("http://www.allocine.fr/film/fichefilm-170209/photos/")
End Sub
Private Sub Command2_Click()
navigue ("http://www.allocine.fr/recherche/?q=%23chef")
End Sub
Private Sub navigue(p$)
WebBrowser1.Silent = True
compte% = 1
WebBrowser1.Navigate p$
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If compte% > 0 Then
compte% = compte% + 1
If (pDisp Is WebBrowser1.object) Or compte% > 5 Then
DoEvents
WebBrowser1.Stop
MsgBox (WebBrowser1.Document.documentelement.innerhtml)
If compte% > 5 Then WebBrowser1.GoHome
compte% = 0
End If
End If |
Partager