카카오톡 scrap(url 미리보기) 안될때 체크 리스트
스크랩서버는 아래와 같은 User-Agent로 운영하시는 시스템에 접근합니다.
User-Agent : facebookexternalhit/1.1; kakaotalk-scrap/1.0; +https://devtalk.kakao.com/t/scrap/33984
운영하시는 사이트는 403 에러 응답과 함께 아래와 같이 응답합니다.
<!DOCTYPE html>
<title>Checking search engine crawler...</title><noscript>
<p>Javascript required</p>
</noscript>
<meta content="width=device-width" name=viewport>
<link href="data:;base64,=" rel=icon>
<script>
(()=>{const e=2;let t,n,o,l,r,a,c,s,d=-1,u="",h={},f=e=>document.getElementById(e);function p(e,t,n){let o=document.createElement(e);if(t)for(let e in t)o[e]=t[e];return n&&x(o,n),o}const m=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),w=new Uint32Array(64),g=new Uint32Array(8);function y(e,t){let n=t+9+63>>6,o=n<<6;e[t]=128,e.fill(0,t+1,o);let i=8*t;e[o-4]=i>>>24&255,e[o-3]=i>>>16&255,e[o-2]=i>>>8&255,e[o-1]=255&i,g[0]=1779033703,g[1]=3144134277,g[2]=1013904242,g[3]=2773480762,g[4]=1359893119,g[5]=2600822924,g[6]=528734635,g[7]=1541459225;for(let t=0;t<n;t++){let n=t<<6;for(let t=0;t<16;t++){let o=n+(t<<2);w[t]=e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3]}for(let e=16;e<64;e++){let t=w[e-15],n=w[e-2],o=(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3,i=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10;w[e]=w[e-16]+o+w[e-7]+i|0}let o=g[0],i=g[1],l=g[2],r=g[3],a=g[4],c=g[5],s=g[6],d=g[7];for(let e=0;e<64;e++){let t=d+((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&c^~a&s)+m[e]+w[e]|0,n=o&i^o&l^i&l;d=s,s=c,c=a,a=r+t|0,r=l,l=i,i=o,o=t+(((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+n|0)|0}g[0]=g[0]+o|0,g[1]=g[1]+i|0,g[2]=g[2]+l|0,g[3]=g[3]+r|0,g[4]=g[4]+a|0,g[5]=g[5]+c|0,g[6]=g[6]+s|0,g[7]=g[7]+d|0}}let _;async function b(e){let n=performance.now(),o=await async function(e,t,n,o){let i=(new TextEncoder).encode(e),l=new Uint8Array(64+(i.length+10+9+63>>6<<6));l.set(i);let r=[];for(let e=0;e<t.length;e++)r.push(parseInt(t[e],16));let a=performance.now();for(let t=0;t<n;t++){let n=""+t;for(let e=0;e<n.length;e++)l[i.length+e]=n.charCodeAt(e);y(l,i.length+n.length);let c=!0;for(let e=0;e<r.length;e++)if((g[e>>3]>>>28-((7&e)<<2)&15)!==r[e]){c=!1;break}if(c)return e+n;1023==(1023&t)&&performance.now()-a>=o&&(await new Promise((e=>{if(void 0===_)try{_=new MessageChannel}catch(e){_=null}null!==_?(_.port1.onmessage=e,_.port2.postMessage(0)):setTimeout(e,0)})),a=performance.now())}return null}(t,e,2e8,10);if(d=Math.round(performance.now()-n),null!==o)return a=o,void H();setTimeout((()=>window.location.reload()),5e3)}function H(){r||!a||c||l&&!u||(r=!0,fetch("/__challenge",{method:"POST",headers:{"X-Hashcash-Solution":btoa(a),"X-Hashcash-Solve-Ms":d,"X-Interactive":u,"X-Hashcash-Host":window.location.hostname}}).then((e=>{s&&e.ok&&(s.innerText="Thanks, human!",s.prepend(p("input",{type:"checkbox",checked:!0}))),window.location.reload()})))}function T(e){let t;e=Math.max(e,3);do{for(t="";t.length<e;)t+=Math.random().toString(36).substring(2);t=t.substring(0,e)}while(h[t]);return h[t]=1,t}function A(e){x(e,{display:"none"})}function v(e){x(e,{visibility:"hidden"})}function C(e){x(e,{opacity:0,"pointer-events":"none"}),e.querySelectorAll("input").forEach((e=>e.tabOrder=-1))}function S(e,t){return t=t||0,Math.floor(Math.random()*(e-t))+t}function k(e,t){let n=T(8),o=p("div",{className:"check-wrap"},{top:S(8,1)+"ex"}),i=p("input",{type:"checkbox",id:n}),l=p("label",{htmlFor:n,innerText:"I am human"});return i.addEventListener("change",(()=>{!function(e,t){s=e,e.innerText="Verifying";let n=p("div",{className:"spinner small"});e.prepend(n),u+=t,H()}(o,t)})),e.appendChild(o),o.appendChild(i),o.appendChild(l),o}function x(e,t){let n=document.styleSheets[0],o="c"+T(8),i=Object.keys(t).map((e=>e+":"+t[e]+" !important")).join(";");e.classList.add(o),n.addRule("."+o,i)}function M(e,t){f("head").innerText=e,f("text").innerText=t}function E(){if(l){!function(){let e=f("active"),t=S(10),n=[A,v,C][S(3)];for(i=0;i<10;i++){const l=t===i,r=k(e,l?o:T(o.length));l?x(r,{opacity:1}):n(r)}}(),M("Confirm you are human","We need to check you're not a robot before you can enter this site."),f("active").style.display="block"}else M("Checking search engine crawler","This will only take a few seconds..."),f("main").appendChild(p("div",{className:"spinner big"}))}window.addEventListener("load",(()=>{!function(i){t=atob(i.split(":")[1]);let r=t.split("|");n=r[3]||0,o=r[4]||"",l=n>=e}(function(e){let t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;e<n.length;e++){let o=n[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}("_hcc"));let i=3500,r=10+S(100);window.tt=r,setTimeout(E,r),c=setTimeout((()=>{c=null,H()}),i),l&&setTimeout((()=>window.location.reload()),12e4),b("0000")}))})();
</script>
<style>
* {
font-family: Helvetica Neue, HelveticaNeue, Helvetica, Arial, sans-serif;
color: #111516;
margin: 0;
padding: 0;
user-select: none;
box-sizing: border-box
}
body {
min-height: 100vh;
min-height: 100dvh;
padding: 8px
}
#main,
body {
display: flex;
flex-direction: column;
align-items: center
}
#main {
flex: 1;
justify-content: center
}
h1 {
font-weight: 500;
padding-bottom: 16px;
text-align: center
}
#active {
display: none;
position: relative;
margin-bottom: calc(48px + 1em + 8ex)
}
#body {
text-align: center
}
input[type=checkbox] {
margin-right: 10px
}
div.check-wrap {
position: absolute;
white-space: nowrap;
background-color: #f7f8fe;
border-radius: 4px;
padding: 24px;
left: 50%;
line-height: 1em;
transform: translateX(-50%)
}
.spinner {
border: 3px solid #3f58e0;
border-top-color: transparent;
border-right-color: transparent;
border-radius: 50%;
animation: rotate .6s linear infinite;
aspect-ratio: 1
}
.small {
border-width: 2px;
display: inline-block;
vertical-align: bottom;
width: 1em;
margin-right: 16px
}
.big {
margin: 32px;
height: 40px;
width: 40px
}
#brand {
white-space: nowrap;
font-weight: 700;
margin: 40px;
margin-top: 10px
}
svg {
vertical-align: bottom;
display: inline-block;
fill: #3F58E0;
height: 1.3em;
margin-right: -2px
}
a {
color: #3f58e0;
text-decoration: none
}
@keyframes rotate {
0% {
transform: rotate(0)
}
100% {
transform: rotate(360deg)
}
}
</style>
<div id=main>
<h1 id=head></h1>
<div id=body>
<div id=text></div>
<div id=active></div>
</div>
</div>
<div id=brand></div>