本帖最后由 qqtest 于 2017-10-8 15:10 编辑
我要采集的是这个页面的内容 https://www.benmi.com/AuctionP.h ... =5&g_w=1000&h=1&s=1
用HttpHelper采集得到的页面是下面这个。
[HTML] 纯文本查看 复制代码 <!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>安全检查中...</title>
<style type="text/css">
html, body {width: 100%; height: 100%; margin: 0; padding: 0;}
body {background-color: #ffffff; font-family: Helvetica, Arial, sans-serif; font-size: 100%;}
h1 {font-size: 1.5em; color: #404040; text-align: center;}
p {font-size: 1em; color: #404040; text-align: center; margin: 10px 0 0 0;}
#spinner {margin: 0 auto 30px auto; display: block;}
.attribution {margin-top: 20px;}
</style>
<script type="text/javascript">
//<![CDATA[
(function(){
var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
b(function(){
var a = document.getElementById('yjs-content');a.style.display = 'block';
setTimeout(function(){
var s,t,o,p,b,r,e,a,k,i,n,g,f, jTIeZDf={"A":+((!+[]+!![]+[])+(+!![]))};
t = document.createElement('div');
t.innerHTML="<a href='/'>x</a>";
t = t.firstChild.href;r = t.match(/https?:\/\//)[0];
t = t.substr(r.length); t = t.substr(0,t.length-1);
a = document.getElementById('jschl-answer');
f = document.getElementById('challenge-form');
;jTIeZDf.A*=+((!+[]+!![]+!![]+[])+(+[]));jTIeZDf.A-=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));jTIeZDf.A+=+((+!![]+[])+(!+[]+!![]+!![]));jTIeZDf.A*=+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));jTIeZDf.A-=+((+!![]+[])+(!+[]+!![]));jTIeZDf.A+=+((+!![]+[])+(+!![]));jTIeZDf.A+=+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));jTIeZDf.A+=+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]));jTIeZDf.A+=+((!+[]+!![]+!![]+!![]+[])+(+[]));jTIeZDf.A*=+((!+[]+!![]+!![]+!![]+[])+(+!![]));a.value = parseInt(jTIeZDf.A, 10) + t.length; '; 121'
f.submit();
}, 4000);
}, false);
})();
//]]>
</script>
</head>
<body>
<table width="100%" height="100%" cellpadding="20">
<tr>
<td align="center" valign="middle">
<div class="yjs-browser-verification yjs-im-under-attack">
<noscript><h1 data-translate="turn_on_js" style="color:#bd2426;">请打开浏览器的javascript,然后刷新浏览器</h1></noscript>
<div id="yjs-content" style="display:none">
<div>
<div class="bubbles"></div>
<div class="bubbles"></div>
<div class="bubbles"></div>
</div>
<h1>benmi.com <span data-translate="checking_browser">浏览器安全检查中...</span></h1>
<p data-translate="process_is_automatic"></p>
<p data-translate="allow_5_secs">还剩 5 秒…</p>
</div>
<form id="challenge-form" action="/cdn-cgi/l/chk_jschl" method="get">
<input type="hidden" name="jschl_vc" value="09f510a13928780b9f3d240b6c63e9af"/>
<input type="hidden" name="pass" value="1507364778.127-HAW8WXpH5d"/>
<input type="hidden" id="jschl-answer" name="jschl_answer"/>
</form>
</div>
<div class="attribution"><a href="http://su.baidu.com/" target="_blank" style="font-size: 12px;"></a></div>
</td>
</tr>
</table>
</body>
</html>
抓包后发现他是5秒后提交到这种页面的https://www.benmi.com/cdn-cgi/l/ ... jschl_answer=955272
jschl_vc 及pass值可以从前面页面直接获取,唯有jschl_answer的值不知道是如何计算的,js也看不懂。求大神帮助。
只有获取了jschl_answer的值,在取得这个页面的cookies后再访问https://www.benmi.com/AuctionP.h ... =5&g_w=1000&h=1&s=1才能正常返回值 。
|