Jump to content

What's the function for reading off webpage


 Share

Recommended Posts

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.

Link to comment
Share on other sites

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?

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...