wwwgrab

This PERL5 script will grab a URL for you and either put it into a file or cat it to STDOUT.

wwwgrab [3.5 K]

wwwgrab.proxy [3.5 K] -- For use with a proxy server


NEW (REALLY!): I've released wwwgrab2.alpha1!. It has support for HTML/1.0 (finally), redirect support, and one day hopefully support for POST operations. If you have any other features/things you'd like to see, let me know. However, since this is a free project, I only work on this when I get time... Which, if the last few years have been any indication, that won't be soon.
Troubleshooting Guide
ProblemWhat's WrongSolution
Protocol not supported You are not running a good version of Perl5 I found that my problems went away when I went to perl5.001m
You haven't edited the script to work with Perl4 Bill Kirtley (kirtley@FCR.COM) sent me this message:
Rather than install perl 5 I managed to get wwwgrab to work with perl
4 by making two changes:

43,44c43
< # Required for perl5.
< use Socket;
---
> require "sys/socket.ph"; # probably /usr/local/lib/perl/sys/socket.ph
82c81
<   if (!socket(S,AF_INET,SOCK_STREAM,$proto)) { die "$0:  Fatal Error.  $!\n"; }
---
>   if (!socket(S,&AF_INET,&SOCK_STREAM,$proto)) { die "$0:  Fatal Error.  $!\n";}

In summary, I replaced the 'use Socket;' line with 'require
"sys/socket.ph";', and added '&' to the AF_INET and SOCK_STREAM
symbols.
wwwgrab doesn't work with CGI scripts Your UNIX shell is messing with you You need to escape ? and * (and others)
Ex.
wwwgrab http://blah.com/~blah/cgi-bin?AZ
would need to become
wwwgrab http://blah.com/~blah/cgi-bin\?AZ
or
wwwgrab "http://blah.com/~blah/cgi-bin?AZ"
Back to my homepage