Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Rip text from a website into a string indicator on a Front Panel

Overview

This example demonstrates extracting text from a webpage.

 

Description

Starting with a WebBrowser ActiveX control, invoke and property nodes are used to navigate to a URL and extract the text from the webpage.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Type the URL of a webpage into the URL text control, such as " http://www.google.com ".
  2. Run the VI.

 

Additional Information or References

 

Front Panel snippet2.PNG

 

VI Snippet

1.png

 

**This document has been updated to meet the current required format for the NI Code Exchange.** 

Dan Richards
Certified LabVIEW Developer
Comments
Todd S.
NI Employee

This is a great VI!  I've been trying to migrate some online spreadsheets into LabVIEW for analysis, and until now I've had to copy every page into Excel or notepad first!  This is going to save me the longest, most manual step of the whole process.  Thanks!!!

Todd S.
LabVIEW Community Manager
National Instruments
Trusted Enthusiast
Trusted Enthusiast

Looks simmilar to the example here: http://zone.ni.com/devzone/cda/epd/p/id/2743

That works great and I have been using for a while now to test POE devices that have a status webpage.

But I don't have LV 8.6 so I can't really compare them...

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Member RoyA
Member

Is there any way to interact with the resulting page?  I want to extract text from a bank account.  Need to be able to login to account first, go to account page, then rip text.

Active Participant crelf Active Participant
Active Participant

You can rip images from webpages too: https://lavag.org/topic/4319-displaying-images-from-a-webpage/





Copyright © 2004-2018 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Active Participant Thoric Active Participant
Active Participant

I use datasocket read to extract the html source from URL addresses. Far simpler:

datasocket.png

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Active Participant Marian_O
Active Participant

Kudos to Thoric!

Marian Vorderer
Active Participant pallen
Active Participant

Just went looking for this and couldn't find it.  Any idea where this post got to?

---------------------
Patrick Allen: FunctionalityUnlimited.ca
Member BalajiB
Member

thank u very much

very useful