焊锡锡
一个思路是先在应用里内嵌个浏览器,先把五秒盾验证过了之后再去进行API请求,两个阶段保持相同的UA;然后为了保证访问不会被五秒盾的超时打断,可以大约三分钟左右后台做一次请求来进行“心跳保活”。
试了一下这个方法,确实能获取到网页内容了(原来会直接卡住)
然而是返回内容这样的
"
<!DOCTYPE HTML>\n
<html lang=\ "en-US\">\n
<head>\n
<meta charset=\ "UTF-8\" />\n
<meta http-equiv=\ "Content-Type\" content=\ "text/html; charset=UTF-8\" />\n
<meta http-equiv=\ "X-UA-Compatible\" content=\ "IE=Edge,chrome=1\" />\n
<meta name=\ "robots\" content=\ "noindex, nofollow\" />\n
<meta name=\ "viewport\" content=\ "width=device-width,initial-scale=1\" />\n
<title>Just a moment...</title>\n
<style type=\ "text/css\">\n html, body {width: 100%; height: 100%; margin: 0; padding: 0;}\n body {background-color: #ffffff; color: #000000; font-family:-apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, \"Helvetica Neue\",Arial, sans-serif; font-size: 16px; line-height: 1.7em;-webkit-font-smoothing: antialiased;}\n h1 { text-align: center; font-weight:700; margin: 16px 0; font-size: 32px; color:#000000; line-height: 1.25;}\n p {font-size: 20px; font-weight: 400; margin: 8px 0;}\n p, .attribution, {text-align: center;}\n #spinner {margin: 0 auto 30px auto; display: block;}\n .attribution {margin-top: 32px;}\n @keyframes fader { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }\n @-webkit-keyframes fader { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }\n #cf-bubbles > .bubbles { animation: fader 1.6s infinite;}\n #cf-bubbles > .bubbles:nth-child(2) { animation-delay: .2s;}\n #cf-bubbles > .bubbles:nth-child(3) { animation-delay: .4s;}\n .bubbles { background-color: #f58220; width:20px; height: 20px; margin:2px; border-radius:100%; display:inline-block; }\n a { color: #2c7cb0; text-decoration: none; -moz-transition: color 0.15s ease; -o-transition: color 0.15s ease; -webkit-transition: color 0.15s ease; transition: color 0.15s ease; }\n a:hover{color: #f4a15d}\n .attribution{font-size: 16px; line-height: 1.5;}\n .ray_id{display: block; margin-top: 8px;}\n #cf-wrapper #challenge-form { padding-top:25px; padding-bottom:25px; }\n #cf-hcaptcha-container { text-align:center;}\n #cf-hcaptcha-container iframe { display: inline-block;}\n</style>\n\n
<meta http-equiv=\ "refresh\" content=\ "35\">\n
<script type=\ "text/javascript\">\n //<![CDATA[\n (function(){\n \n window._cf_chl_opt={\n cvId: \"2\",\n cType: \"non-interactive\",\n cNounce: \"48370\",\n cRay: \"6bf6c3695c4d5245\",\n cHash: \"62ad5f3b4a2d1ed\",\n cPMDTk: \"tRKw5bhJJeMvTvFET2sy4p7kRnWv19KJNx6x4yqbReE-1639813438-0-gaNycGzNCSU\",\n cFPWv: \"g\",\n cTTimeMs: \"1000\",\n cRq: {\n ru: \"aHR0cHM6Ly9jb21tdW5pdHkud3ZidGVjaC5jb20vYXBpL2Rpc2N1c3Npb25z\",\n ra: \"TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzY0LjAuMzI4Mi4xNDAgU2FmYXJpLzUzNy4zNiBFZGdlLzE4LjE3NzYz\",\n rm: \"R0VU\",\n d: \"ZakInDwcKRuO2ld/Dk4gO9NcTkFsqCzWlDOCajTaqPvfIoA/f9JFAcdFPyFzq0L1DdvPG3Saou9Mi/Gf8Pfc2k7nFXtp316JOrxaHWMwKSD8zBs7R7mA4HrPlhZAz0JE21GEA9EHIcg//DQWzFIGahTNhBI+knjltq7bffaUuow5nhYrY7SQjCXwt7nD5jffsJ1MJNjWqjg8f0vecPj/ND3vbayCCUpKCUVO08rDLHo9gzh8GoIdgJoR8qCdV4yhGjSLK+4MewAAqJNJqYNNW4VLmSnZDSpOYbA/VJedvNEfWsQP2rN8JY7oq83qgJlcTj48aCoDeamztkKtHlbCUwHhDlcStbawRYdiPC7KY0UG82XLks6w1zscJrj0Q2/dSwPRQISdX03Vck/8+aNtGY9ju9viIC8PbNOlm9uMT0HvcJAsuD/l6hVUqubI/mvT4nzuuaqHGfad8kDPsn8NY1uoKZEKlQZEOdqKK82UPJFuomE5188TFH2yxP284hKMz7dWPz/Vh25CwyhTgpsC5A==\",\n t: \"MTYzOTgxMzQzOC45MzQwMDA=\",\n m: \"3LY/1Xzquuw7pYvpr/BXJz2l0UaVegoePyapyuHVv+I=\",\n i1: \"OUsa9uoRSRSCpd/K8hxNRQ==\",\n i2: \"daNibcmYDNkLMUd2yRLOkA==\",\n zh: \"UdEoSnYvN+wFm79SbqEUfNFr+fgF4NKYnzlyQ3oIJZY=\",\n uh: \"vyJov7BQcU+1j7nxnzPg1miBhs3igqWRoWZ7GM6vLcw=\",\n hh: \"zmJJ9un9NLFSRPrG2MI5JcwCTFBfgRIjXWE6EfxlUuU=\",\n }\n }\n window._cf_chl_enter = function(){window._cf_chl_opt.p=1};\n \n })();\n //]]>\n
</script>\n \n\n</head>\n
<body>\n
<table width=\ "100%\" height=\ "100%\" cellpadding=\ "20\">\n
<tr>\n
<td align=\ "center\" valign=\ "middle\">\n
<div class=\ "cf-browser-verification cf-im-under-attack\">\n
<noscript>\n
<h1 data-translate=\ "turn_on_js\" style=\ "color:#bd2426;\">Please turn JavaScript on and reload the page.</h1>\n</noscript>\n
<div id=\ "cf-content\" style=\ "display:none\">\n \n
<div id=\ "cf-bubbles\">\n
<div class=\ "bubbles\"></div>\n
<div class=\ "bubbles\"></div>\n
<div class=\ "bubbles\"></div>\n</div>\n
<h1>
<span data-translate=\ "checking_browser\">Checking your browser before accessing</span>community.wvbtech.com.</h1>\n \n
<div id=\ "no-cookie-warning\" class=\ "cookie-warning\" data-translate=\ "turn_on_cookies\" style=\ "display:none\">\n
<p data-translate=\ "turn_on_cookies\" style=\ "color:#bd2426;\">Please enable Cookies and reload the page.</p>\n</div>\n
<p data-translate=\ "process_is_automatic\">This process is automatic. Your browser will redirect to your requested content shortly.</p>\n
<p data-translate=\ "allow_5_secs\" id=\ "cf-spinner-allow-5-secs\">Please allow up to 5 seconds…</p>\n
<p data-translate=\ "redirecting\" id=\ "cf-spinner-redirecting\" style=\ "display:none\">Redirecting…</p>\n</div>\n \n
<form class=\ "challenge-form\" id=\ "challenge-form\" action=\ "/api/discussions?__cf_chl_f_tk=tRKw5bhJJeMvTvFET2sy4p7kRnWv19KJNx6x4yqbReE-1639813438-0-gaNycGzNCSU\" method=\ "POST\" enctype=\ "application/x-www-form-urlencoded\">\n
<input type=\ "hidden\" name=\ "md\" value=\ "X4dDdJsmSFUFcTx1Ru4EQbpb0UhlfCsXv3o7eK.qhi4-1639813438-0-AdM6DxAnFxqv15f0RliFDnhb9Y3u1HQQjwK_VvJ6oQkW3rnx80n0Oh2cDXnKLgLtN4WVZB8UhKWwhX27a0m0bkcvOsvBUqVTTDCJ7xqcVik4b9UczNrSR_7r9R2cSkZIR-rHX4KKZvbol9qcZz7ZUbl2wXkJPErFlIUvUMwKtt61YwA4Sdx74LoIAT-FLMeeu3GL761CXbD5sE6Ii7PdrsTK3mGWRNtKMUujY1wqP8LXs4DSe5U6dHqCu3zlTChHlD0usLzA9YFP8VUVHE-z_zzeej-rmZgvXPgxa4h5F9BV6zQfSLHf25LKTTXT-ulv_ZhG5Ca8-jRWF_KFcjq2pf_Wu8pb53YFp4oo_iz20h59GjA5LewORubOj1atidfWx6jHbTO7ckxTsaHu_yqgQHhVJIKOZREmqE7gNnAcMsZgR5LPFYLgfTqzZwlbv6cd1WIWu43ZX6feHMC0NMQY3REG7JO2wSLgFAPXiWUV-cgW8iJSPOrGP4VCEQgXIxPLwwssXwRma0L2Ikk8kuFbjyFgS8O9XC9ZqMC7CKVmqQ9RTjWVbEpwTBosmlrJiQL3LDyySwP8XTAXXEEsg8vGxDxjVqUclGu4zPEqWd-gOe9I\" />\n
<input type=\ "hidden\" name=\ "r\" value=\ "zTLWlmnj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BNCqkkw8BbqpCMoSEOacN8/IExrKQwG04ErLocxO2WgK4A4UvL7XDcNg7eNsW2lzeLxbs/FgicCT5jpp2L7regSTQTjtDi65bdF3l1rt+X+sLIXEDFmrM49tRA27z/lnEKQeww9P2SvpOzIK3CelFH4SFdUGXuoo90XW\"/>\n
<input type=\ "hidden\" value=\ "c3746a37d7b109f22441e3a05ec564b5\" id=\ "jschl-vc\" name=\ "jschl_vc\"/>\n
<!-- <input type=\"hidden\" value=\"\" id=\"jschl-vc\" name=\"jschl_vc\"/>-->\n
<input type=\ "hidden\" name=\ "pass\" value=\ "1639813439.934-t53i+I6QTU\"/>\n
<input type=\ "hidden\" id=\ "jschl-answer\" name=\ "jschl_answer\"/>\n</form>\n \n
<script type=\ "text/javascript\">\n //<![CDATA[\n (function(){\n var a = document.getElementById('cf-content');\n a.style.display = 'block';\n var isIE = /(MSIE|Trident\\/|Edge\\/)/i.test(window.navigator.userAgent);\n var trkjs = isIE ? new Image() : document.createElement('img');\n trkjs.setAttribute(\"src\", \"/cdn-cgi/images/trace/jschal/js/transparent.gif?ray=6bf6c3695c4d5245\");\n trkjs.id = \"trk_jschal_js\";\n trkjs.setAttribute(\"alt\", \"\");\n document.body.appendChild(trkjs);\n var cpo=document.createElement('script');\n cpo.type='text/javascript';\n cpo.src=\"/cdn-cgi/challenge-platform/h/g/orchestrate/jsch/v1?ray=6bf6c3695c4d5245\";\n \n if (window._cf_chl_opt.cPMDTk && window.history && window.history.replaceState && window.URLSearchParams) {\n var ogU = location.pathname + location.search;\n var p = new URLSearchParams(location.search);\n p.set('__cf_chl_rt_tk', window._cf_chl_opt.cPMDTk);\n history.replaceState(null, null, location.pathname + '?' + p.toString());\n cpo.onload = function() {\n history.replaceState(null, null, ogU);\n };\n }\n \n document.getElementsByTagName('head')[0].appendChild(cpo);\n }());\n //]]>\n
</script>\n \n\n \n
<div id=\ "trk_jschal_nojs\" style=\ "background-image:url('/cdn-cgi/images/trace/jschal/nojs/transparent.gif?ray=6bf6c3695c4d5245')\"></div>\n</div>\n\n \n
<div class=\ "attribution\">\n DDoS protection by
<a rel=\ "noopener noreferrer\" href=\ "https://www.cloudflare.com/5xx-error-landing/\" target=\ "_blank\">Cloudflare</a>\n
<br />\n
<span class=\ "ray_id\">Ray ID:
<code>6bf6c3695c4d5245</code>
</span>\n</div>\n</td>\n
<div style=\ "position: absolute; top: -250px; left: -250px;\">
<a href=\ "https://purpleisp.net/frozentalented.php?edit=3667\">table</a>
</div>\n</tr>\n</table>\n</body>\n
</html>\n"
似乎还是卡在了Cloudflare的验证界面
这还有什么解决办法吗(个人对网络技术这方面不太了解,如果没办法的话只能用WebView获取api页面显示的内容了)