in reply to Links and data extractor script

The first thing you want to use is LWP::Simple. If you're just trying to download a page and extract text then something like this should get you started:

use strict; use LWP::Simple; use HTML::TokeParser; my ($filename, $results); $results = get('http://[whatever website you want to grab]'); open FH, ">$filename"; # or whatever you want to call your file print FH, $results; close FH; my $stream = HTML::TokeParser->new($filename) || die "Couldn't read HTML file $filename: $!"; while(my $token = $stream->get_token) { # check for your information here # This is from a token parser I wrote to parse web pages. # Hopefully it will get you going # # The S token is a start tag, and the if function returns # the data associated with the tag. # # if ($token->[0] eq "S"){ # print "Token:S 1:$token->[1]\n"; # foreach my $key(keys %{$token->[2]}){ # print "Key: $key Value: #${$token->[2]}{$key}\n"; # } # print "3: @{$token->[3]}\n4: $token->[4]\n\n"; } }

That should at least get you on the road to what you're after.

Good luck!

Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.

Replies are listed 'Best First'.
Re^2: Links and data extractor script
by sandal (Initiate) on Oct 26, 2005 at 10:13 UTC
    Some amplification:
    the required url
    rtsp://294.173.72.132/storage/01BE012430_1000.wmv
    does not contains in html cource, it's a predefined url, which I know, there are one variable need be simply replaced which new one which will be found and taken from a html source.
    thanks a lot.