Page 1 of 1

How to scrape text off a webpage

PostPosted: Thu Aug 25, 2022 8:30 am
by ESteele
Hello.

Does eValid have a way to scrape the text off a particular web page?

Can you provide me with the steps involved to do this correctly in your reply?

Thanks in advance

Re: How to scrape text off a webpage

PostPosted: Mon Aug 29, 2022 7:47 am
by eValid
ESteele wrote:Hello.

Does eValid have a way to scrape the text off a particular web page?

Can you provide me with the steps involved to do this correctly in your reply?

Thanks in advance


Thanks for posting ESteele.

Indeed, sometimes you do need to know ALL Of the text into a local file, for comparison or validation.

The command for this is SaveVisibleText wid "filename" "frame path" where you have to specify the window number "wid" beginning with "0" for the parent window and increasing by one for each sub window you are away from the original.

"filename" is the local filename (it could be a complete path ending in a valid filename) where you want the text to go.

This command will copy all visible text -- what you can see on the screen (what is active and has the DOM attribute "Visible") -- into the named file.)

If you want the entire HTML file, the command for that is: SaveHTML wid "filename "frame path"

This operates similarly, but you get everything on the page...fair disclosure, this could be a lot of data.


-- eValid Support