Jump to content

Reading from a webpage


Recommended Posts

Hi Guys, I'm trying to find a way to collect data from a webpage using IE.

I already know about _IEBodyReadText($oIE) but the problem is, I just want a specific instance of that text without getting all of it.

What I want to be able to do, is to read that text line by line, and when I find a specific string on the line I want, I want to be able to print out that entire line.

The problem for me is that It _IEBodyReadText formats the text into one big string, so I would have to use split string to accomplish this task. The problem with that is, there are no lines, so I don't know how I would write something like,

if substring=Cluster read untill you reach .com, and let that be the substring....

Should I tackle this problem that way, or should I find a way to get the substring I want from the HTML itself?

Thanks,

Athos

Link to comment
Share on other sites

Sure thing. This is from the html source (note I modded it again to protect the data)

<tr><td>&amp;nbsp;</td><td><font class="f-body">This is the body of text taht I want to avoid </font></td></tr>

<tr><td>&amp;nbsp;</td><td>

<font class="f-navbar">Cluster Host = </font><font class='f-body'>

something.com</font>

I want to get Cluster host and the something.com in 1 string. That or just the something.com would be good.

Edited by Athos
Link to comment
Share on other sites

Use function_IETableWriteToArray to retrieve the content of the table. You then can loop through the array and search for your data.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Glad to be of service :D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

×
×
  • Create New...