A few mins, and a few lines of perl (link)
Code:
$ cat fetcher.pl
#!/usr/bin/perl
use warnings;
use strict;
use HTML::TreeBuilder 5 -weak;
use WWW::Mechanize;
my $domain = "https://finance.yahoo.com/quote/%5EDJI?p=%5EDJI";
my $mech = WWW::Mechanize->new();
$mech->get($domain);
my $tree = HTML::TreeBuilder->new;
$tree->parse_content($mech->content);
$tree->elementify();
my $price = $tree->look_down("_tag"=>"div","id"=>"quote-header-info");
if ( $price ) {
print $price->as_trimmed_text() . "\n";
} else {
print "Can't find it\n";
}
$ ./fetcher.pl
^DJI - Dow Jones Industrial AverageDJI - DJI Real Time Price. Currency in USD23,358.24-100.12 (-0.43%)At close: 4:52PM EST
Feel free to tweak the look_down to locate the specific bit of HTML which interests you.
> no, not really, it's just my programming 'skills' are largely limited to C++ so I was hoping to work within that.
When the only tool in the toolbox is a hammer, pretty soon all the problems look like nails.