Example Code

Wikipedia Link Parser using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This code returns an array with a list of all the Wikipedia links contained within a Wikipedia article

 

Description:

This returns an array with a list of all the Wikipedia links contained within a Wikipedia article. From this, you could automate a program that calculates degrees of separation from other Wikipedia pages or views which links are most frequent on a particular page.

 

Requirements

  • LabVIEW 2012( (or compatible)

 

Steps to Implement or Execute Code

  1. In the URL Parameter string control, enter in the title that comes after "http://en.wikipedia.org/wiki/". For example, for the Wikipedia page "http://en.wikipedia.org/wiki/National_Instruments", enter in National_Instruments. 
  2. Run the vi.

 

Additional Information or References:

Front Panel

Wikipedia Link Parser Front Panel.png

Block Diagram

Wikipedia Link Parser Block Diagram.png

 

Note: This VI uses features introduced in LabVIEW 2012.

 

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

 

Ravi A.
National Instruments | Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.