LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 12-10-2017, 10:14 AM   #16
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,386
Blog Entries: 3

Rep: Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776

The split line with the findnodes() function shows how to do that. It takes an XPath as an argument. As is, the perl script shows the number of shares traded (volume) and average volume over the last 30 days.

Code:
//tr[td[@data-snapfield="vol_and_avg"]]/td[2]
If you want different data, craft the XPath for the other data. Google's use of the data-snapfield attribue makes it easier to target a specific value. Some values, like vol_and_avg are paired and connected with a slash, thus the line to split() the data into two variables. Fields like market_cap won't need that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CLI app to pull latest Last.fm scrobble Ketchup901 Linux - Software 1 07-04-2017 01:46 PM
LXer: UBER CLI : Easily Get Uber Pickup Time & Price Estimates from Linux Command Line LXer Syndicated Linux News 0 03-31-2017 12:01 PM
LXer: Google's Chrome to pull plug on plugins next September LXer Syndicated Linux News 0 11-25-2014 05:42 AM
LXer: Google to pull H.264 HTML5 support from Chrome LXer Syndicated Linux News 1 01-13-2011 12:26 PM
Stock market "find the best price model" program cigarstub Programming 1 01-07-2007 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration