Hello, I'm trying to use HTTP::Tiny to get the html of a web page, but I'm getting a 403 Forbidden status. Am I doing something wrong?
This is my code:
use strict;
use warnings;
use HTML::TreeBuilder;
use HTTP::Tiny;
use Data::Dumper qw(Dumper);
use IO::Socket::SSL;
my $link = 'https://www.tudogostoso.com.br/receita/199993-bolo-de-lima
+o.html';
my $response = HTTP::Tiny->new->get($link);
my $html;
print "$response->{status}\t$response->{reason}\n";
print $response->{content};
if ($response->{success}) {
$html = $response->{content};
print "entrou\n";
}
And the prints:
403 Forbidden
<html><head><title>You have been blocked</title><style>#cmsg{animation
+: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}
+</style></head><body style="margin:0"><p id="cmsg">Please enable JS a
+nd disable any ad blocker</p><script type="3cc341b69494194c916377bc-t
+ext/javascript">var dd={'cid':'AHrlqAAAAAMAn9GuxP5ZUjsAut-v0g==','hsh
+':'C499C5254821BA7F386B459241B3FC','t':'fe'}</script><script src="htt
+ps://ct.datado.me/c.js" type="3cc341b69494194c916377bc-text/javascrip
+t"></script><script src="https://ajax.cloudflare.com/cdn-cgi/scripts/
+95c75768/cloudflare-static/rocket-loader.min.js" data-cf-settings="3c
+c341b69494194c916377bc-|49" defer=""></script></body></html>