Skip to content

Instantly share code, notes, and snippets.

@scumola
Created April 4, 2011 14:48
Show Gist options
  • Select an option

  • Save scumola/901757 to your computer and use it in GitHub Desktop.

Select an option

Save scumola/901757 to your computer and use it in GitHub Desktop.
wget lines for mirroring sites
#!/usr/bin/perl
#Simple Perl script to save me from having to memorise the parameters.
#Archives a whole website.
die("Usage: archive.pl \"URL(s)\" [wait]\n") unless ($ARGV[0]);
my $waitTime = 1;
$waitTime = $ARGV[1] if ($ARGV[1]);
system("wget --mirror --page-requisites --continue --convert-links --user-agent=\"\" -e robots=off --wait $waitTime $ARGV[0]");
#!/usr/bin/perl
#Simple Perl script to save me from having to memorise the parameters.
#Grabs the pages specified and converts any links between them.
die("Usage: grab.pl \"URL(s)\" [wait]\n") unless ($ARGV[0]);
my $waitTime = 1;
$waitTime = $ARGV[1] if ($ARGV[1]);
system("wget --page-requisites --continue --convert-links --user-agent=\"\" -e robots=off --wait $waitTime $ARGV[0]");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment