【发布时间】:2018-07-01 11:13:26
【问题描述】:
当我使用curl 来检索 html 页面时,我遇到以下消息:
Please turn JavaScript on and reload the page。
我不知道如何处理这个问题,因此我可以在我的网络浏览器上打开相同的页面。
[Q] 我怎样才能解决这个问题,以便仅使用终端检索 html 页面的信息?
$ curl http://bsod.pw/
<html>
<head>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script>
function onSubmit(token) {
document.getElementById("recaptcha-form").submit();
}
</script>
</head>
<body>
<div id="recaptcha-loading" style="margin: 0px; padding: 0px; position: fixed; right: 0px; top: 0px; width: 100%; height: 100%; z-index: 30001; opacity: 0.8;">
<p style="position: absolute; color: White; top: 30%; left: 40%;">
<img src="https://250410.selcdn.ru/antiddos/lg.rotating-balls-spinner.gif">
</p>
</div>
<center><noscript><h1 style="text-align:center;color:red;"><strong>Please turn JavaScript on and reload the page.</strong></h1></noscript>
<form id='recaptcha-form' action="/captcha" method="POST">
<button id='submitbutton' style="visibility:hidden;" class="g-recaptcha" data-badge=bottomright data-sitekey="6LcigjgUAAAAACyu9edrmWKmIce8h0kIFQz7iyRo" data-callback='onSubmit'></button>
<script>
window.onload = function(){
document.getElementById('submitbutton').click();
}
</script>
<br/>
</form>
</center>
</body>
</html>
如果您在网站上执行inspect element(http://bsod.pw/),您可以看到更详细的 html 代码。
感谢您宝贵的时间和帮助。
【问题讨论】:
标签: javascript html curl