summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-06 11:00:59 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-06 11:00:59 +0200
commit82e3bde392a79e276b9ac4e220c006eb1cc83e3a (patch)
tree3498cdfb904c436ef4c4dc7ca77c8088918f1d89 /bin
parent1932c998cac488d6ba27789fea56bcf3a554a35c (diff)
Fake Useragent (pretend to be Firefox)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/comirror1
-rwxr-xr-xbin/comirror-setup1
2 files changed, 2 insertions, 0 deletions
diff --git a/bin/comirror b/bin/comirror
index 453a46b..98353a6 100755
--- a/bin/comirror
+++ b/bin/comirror
@@ -8,6 +8,7 @@ use WWW::Mechanize;
my $mech = WWW::Mechanize->new(
stack_depth => 2,
);
+$mech->agent_alias('Linux Mozilla');
our $VERSION = '0.1';
diff --git a/bin/comirror-setup b/bin/comirror-setup
index 6bdbbe9..b9e1198 100755
--- a/bin/comirror-setup
+++ b/bin/comirror-setup
@@ -90,6 +90,7 @@ print 'Fetching pages';
for my $url (@ARGV) {
push(@mechs, WWW::Mechanize->new( stackdepth => 0 ));
+ $mechs[-1]->agent_alias('Linux Mozilla');
$mechs[-1]->get($url);
print q{.};
}