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>

In reply to HTTP::Tiny status 403 by leosole

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.