From 47d5b68652caa0c2413f46048642cc91cc364342 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 4 Dec 2015 12:08:44 +0000 Subject: [PATCH] Set Referer header to bypass hotlinking protection --- lib/WWW/Offliberty.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WWW/Offliberty.pm b/lib/WWW/Offliberty.pm index 7b658f0..b5b7918 100644 --- a/lib/WWW/Offliberty.pm +++ b/lib/WWW/Offliberty.pm @@ -12,7 +12,7 @@ use constant OFF_URL => 'http://offliberty.com/off54.php'; use HTML::TreeBuilder; use HTTP::Tiny; -my $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION "); +my $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION ", default_headers => {Referer => "http://offliberty.com/"}); sub off{ my ($url, @params) = @_; -- 2.39.2