Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to do
Message
De
13/08/2001 14:46:36
 
 
À
13/08/2001 13:09:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00543113
Message ID:
00543189
Vues:
16
>How do I do 'screen scraping' from VFP? I need to call a URL from inside of VFP and then grab some fields on the HTML Web page that comes up in Internet Explorer.

Here is a sample from the UT download "StartUT.prg" :
oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("www.levelextreme.com")

INKEY(1)
nStartSeconds = SECONDS()
DO WHILE oIE.Document.ReadyState <> "complete" AND (SECONDS()-nStartSeconds < 30)
ENDDO

IF oIE.Document.ReadyState <> "complete"
	MESSAGEBOX("Universalthread is unavailable")
	oie.Visible = .T.
	RETURN .F.
ENDIF

oie.document.forms(0).Key.Value = lcUsername
oIE.Document.Forms(0).Password.Value = lcPassword

oIE.Document.Forms(0).Submit()
oIE.Visible = .T.
Where the web page's fields are accessible through IE's DOM, the forms collection in this case.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform