2008年1月6日日曜日

4-3:Extract an information of web page

UWSC only can extract links? NO, it can access all information of web pages.

This script visits http://www.yahoo.com and gets all text data in the page.
----------
IE = CREATEOLEOBJ("InternetExplorer.Application")
IE.visible = True
IE.navigate("http://www.yahoo.com")
REPEAT
SLEEP(0.1)
UNTIL !IE.busy AND IE.readystate = 4
NOTE = EXEC("notepad")
SENDSTR(NOTE,IE.document.body.innerText)
----------
Sample script No.006
Get script :http://sky.geocities.jp/uwsc_uwsc_uwsc/06.txt


This script visits http://www.yahoo.com and gets all html data between <body> and </body> in the page
----------
IE = CREATEOLEOBJ("InternetExplorer.Application")
IE.visible = True
IE.navigate("http://www.yahoo.com")

REPEAT
SLEEP(0.1)
UNTIL !IE.busy AND IE.readystate = 4

NOTE = EXEC("notepad")
SENDSTR(NOTE,IE.document.body.innerHTML)
----------
Sample script No.007
Get script :http://sky.geocities.jp/uwsc_uwsc_uwsc/07.txt

0 件のコメント: