Jump to content
Sign in to follow this  
molotofc

What's the function for reading off webpage

Recommended Posts

molotofc

I know the _IEBodyReadHTML/Text but they are not what I want, as both of those read off from the webpage source.

What's the function to read off the webpage itself only, not source?

Regards,

Share this post


Link to post
Share on other sites
molotofc

Basically, 'If string abc123 is found then' is what I'm doing at the moment.

The code:

$text = _IEBodyReadText($oIE)

If StringInStr($text, "abc123") Then

but _IEBodyReadText searches in the webpage source which isn't what I want, I need one where it searches on what's displayed on the webpage, not source.

Share this post


Link to post
Share on other sites
Chimp

Basically, 'If string abc123 is found then' is what I'm doing at the moment.

The code:

$text = _IEBodyReadText($oIE)

If StringInStr($text, "abc123") Then

but _IEBodyReadText searches in the webpage source which isn't what I want, I need one where it searches on what's displayed on the webpage, not source.

 

Hi molotofc

the _IEBodyReadText() retrieves the whole text content of the web page, >here is an example of finding text in it

or maybe you want get the text contained within some form fields?


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites
kylomas

molotofc,

There is no single function to read what a WEB page displays on your screen.  Getting data requires some familiarity with the WEB site.  There is no generic approach to this short of emulating the browsers rendering engine.  See post #21 of the link that PincoPanco pointed you to.  JCHD cites one of the techniques used to defeat WEB scraping.

What you can do is examine the site that you are interested in and use the IE* functions to retrieve the data.

All that being said, you can get all TEXT from a WEB site using regexp.  You can find several examples using Google.  Just beware of the limitations. 

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×