From d6d806602b6849bbbc342c30fe173e131382e458 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Fri, 12 Jun 2020 19:36:02 +1200 Subject: URL_Title: Set Mozilla 5.0 compatible UA string This should hopefully address some intermittent blank/simple/default looking pages returned by YouTube intermittently. --- Plugin/URL_Title.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin/URL_Title.pm b/Plugin/URL_Title.pm index 4b85a02..451603a 100644 --- a/Plugin/URL_Title.pm +++ b/Plugin/URL_Title.pm @@ -78,7 +78,7 @@ sub get_title "Accept" => "text/html, image/svg+xml", "Acceot-Encoding" => "gzip" ); - my $http = HTTP::Tiny->new((default_headers => \%headers, timeout => 3)); + my $http = HTTP::Tiny->new((default_headers => \%headers, timeout => 3, agent => 'Mozilla/5.0 (compatible; idalius IRC bot)')); my $response = $http->get($url); -- cgit v1.1