in reply to Re: In need of guidance....
in thread Program that will grep website for specified keyword

"...but be warned that you're going to pull all the graphics and everything else with you."
Why? I'd would just ignore all URLs if they are inside <IMG> tags...
Update: (Or look only for those URLs that are in <a> tags.
Matthew Musgrove
Who says that programmers can't work in the Marketing Department?
Or is that who says that Marketing people can't program?

Replies are listed 'Best First'.
Re: Re: Re: In need of guidance....
by Popcorn Dave (Abbot) on Apr 24, 2002 at 22:12 UTC
    Well you're going to grab a full web page using LWP::Simple, which includes the graphics. At least that is what I discovered, I could be wrong. Check the LWP module docs to make sure, but as I recall, using the get(www.myhost.com) will pull everything whereas using lynx just pulls text, but you're down to using a system call to use lynx as opposed to the module.
      LWP::Simple does not do that unless you tell it too...
      #!/usr/bin/perl use strict; use warnings; use LWP::Simple; my $res_code = getstore('http://www.perlmonks.org/','index.html'); die "Download failed! Response code is $res_code.\n" if $res_code != 2 +00; # continue processing here

      Matthew Musgrove
      Who says that programmers can work in the Marketing Department?
      Or is that who say that Marketing people can't program?
        Okay, I stand corrected. I was just using it as get(www.myhost.com) without specifiying a file to grab. Thanks for pointing that out. As soon as I get a few free moments I'm going to explore that. Should speed my app quite a bit. :)
      Thank you all for the help.