Loading data from USGS can use world_wide_seismicity.sh ,date from USGS catalog

Loading data from ISC, there is some problem for automatic

use curl -s "address" > file.txt, but file.txt was html file. you must read html to txt file. we can use perl. before use you should install

sudo apt-get install libhtml-tableextract-perl
#! /usr/bin/perl -w
#####read html file and get the content in <body> <body>
use strict;
use HTML::Tree;
use LWP::Simple;

#########use url
#my $funky = "http://www.google.com";
#my $content = get($funky);
#my $tree = HTML::Tree->new();
#$tree->parse($content);
my $tree = HTML::Tree->new();

$tree->parse_file("html.txt");

my ($title) = $tree->look_down( '_tag' , 'body' );

 $a=$title->as_text;
 open(DA,">new.txt");
 print DA "$a \n";
close(DA);

results matching ""

    No results matching ""