Я пытаюсь получить содержимое веб-страницы [webresolver.nl] [1]. Я пробовал несколько кодов. Один из них:
use warnings;
use HTTP::Cookies;
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
$mech->agent_alias('Windows IE 6');
$mech->cookie_jar(HTTP::Cookies->new(autosave => 1));
$mech->add_header('Content-Type' => 'text/html; charset=UTF-8', 'Referer' => 'https://webresolver.nl');
$mech->get('https://webresolver.nl');
print $mech->content;
И результат:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="robots" content="index, follow">
<meta name="keywords" content="skype resolver, skyperesolver, free resolver api, skype, tools, resolve, resolver, database, resolvedb, ip2skype, ip to skype, ip, free, api, php, free api, web tools, advanced, webresolver, web, resolver, skype, api, skypebot, bot, 2017, 2018, leaked, whois, screenshot, website, geoip, ping, phone, lookup, number, cloudflare, working, blacklist, portscan" />
<meta name="description" content="Webresolver.nl - Free API, Skype Resolver, Resolver, Email To Skype, Huge Database, Resolve Database, Leaked Databases">
<meta name="twitter:card" value="summary">
<meta property="og:type" content="website" />
<meta property="og:title" content="Easy to use API's - Webresolver.nl" />
<meta property="og:description" content="Webresolver.nl - Free API, Skype Resolver, Resolver, Email To Skype, Huge Database, Resolve Database, Leaked Databases" />
<meta property="og:image" content="https://webresolver.nl/social.png" />
<link rel="image_src" href="https://webresolver.nl/social.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="google-site-verification" content="kRHprU08vhp4g31pv2u8CsIqWZ5_XDlaou5T3P-5wv0" />
<meta name="wot-verification" content="5e516c32e271c87e073a"/>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" href="https://webresolver.nl/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://webresolver.nl/public/images/browsericons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://webresolver.nl/public/images/browsericons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://webresolver.nl/public/images/browsericons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://webresolver.nl/public/images/browsericons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://webresolver.nl/public/images/browsericons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://webresolver.nl/public/images/browsericons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://webresolver.nl/public/images/browsericons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://webresolver.nl/public/images/browsericons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://webresolver.nl/public/images/browsericons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="https://webresolver.nl/public/images/browsericons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://webresolver.nl/public/images/browsericons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="https://webresolver.nl/public/images/browsericons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="https://webresolver.nl/public/images/browsericons/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#37BC9B">
<meta name="theme-color" content="#37BC9B">
<meta name="msapplication-TileImage" content="https://webresolver.nl/public/images/browsericons/ms-icon-144x144.png">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#000"
},
"button": {
"background": "transparent",
"text": "#f1d600",
"border": "#f1d600"
}
},
"content": {
"message": "By using this website, you agree that we and our partners may set cookies for purposes such as customizing content and advertising. Cookies may get shared with third-party applications for analytics and statistics.",
"href": "https://webresolver.nl/cookie-policy"
}
})});
</script>
<title>Webresolver.nl - The best Skype Resolver</title>
</head>
<body>
Validating browser, please wait...<br /><br />
<i><small>If this message persists after 10 seconds, please check you have cookies and JavaScript enabled in your browser.</small></i> <br /><br />
<i><small><small>Protection by <a href="https://webresolver.nl/">webresolver.nl</a> - Token: 5dc811c2424b9</small></small></i>
<script>setTimeout(function() {document.cookie="WebResolverSecurityCode=bb4dfd133db6478f397a8175b9ced3b0; expires=Mon, 11 Nov 2019 00:00:00 GMT; path=/";location.href="https://webresolver.nl/";}, 500);</script>
</body>
</html>
Я ожидал, что содержимое веб-страницы является реальным (домашняя страница в Интернете), а не страницей ожидания. Мне любопытно знать код, чтобы сделать эту работу. Я довольно новичок в Perl. Так что, если кто-нибудь может мне помочь, я был бы признателен.