1. wget works fine within perl script.
2. wget works ok on command line in terminal mode, but the results are different.
I use '/usr/bin/wget' regularly without any problems within perl scripts and I am using the '-p' option to retrieve all webpage prerequisites.
However, when I use the same command in terminal mode the result/output is different.
Does anyone know why wgets behavior changes depending on its environment?
Here's the perl code that works. I am able to fetch an entire webpage except for graphics, which I have rejected/excluded.
$flnm="sample.htm";
$url="anyurlyouwant.com";
Open (WP, "|wget -T 10 -p -R \"gif\" -O $flnm $url") or die "Can't Fetch: $url\n";
close(WP);
Now in terminal mode use the same options but I can't fetch the webpage:
wget -T 10 -p -R "gif" -O "sample.htm" "anyurlyouwant.com"
or if I reduce the options down to:
wget -p -O "sample.htm" "anyurlyouwant.com"
The prerequisite option '-p' doesn't perform in the same manner as it did within perl. Why?
Are there two different wget configuration files lying around? Where are they?
2. wget works ok on command line in terminal mode, but the results are different.
I use '/usr/bin/wget' regularly without any problems within perl scripts and I am using the '-p' option to retrieve all webpage prerequisites.
However, when I use the same command in terminal mode the result/output is different.
Does anyone know why wgets behavior changes depending on its environment?
Here's the perl code that works. I am able to fetch an entire webpage except for graphics, which I have rejected/excluded.
$flnm="sample.htm";
$url="anyurlyouwant.com";
Open (WP, "|wget -T 10 -p -R \"gif\" -O $flnm $url") or die "Can't Fetch: $url\n";
close(WP);
Now in terminal mode use the same options but I can't fetch the webpage:
wget -T 10 -p -R "gif" -O "sample.htm" "anyurlyouwant.com"
or if I reduce the options down to:
wget -p -O "sample.htm" "anyurlyouwant.com"
The prerequisite option '-p' doesn't perform in the same manner as it did within perl. Why?
Are there two different wget configuration files lying around? Where are they?
Comment