흐음...

여러개 패킷을 까본건 아니지만 캐시에서 다른걸로 인식하는 이유가 저 망할 cpn 값 때문인 듯..

https://r2---sn-ab02a0nfpgxapox-jwwe7.googlevideo.com/videoplayback?source=youtube&ms=au%2Conr&mt=1552538122&

mv=m&id=o-ALgIWMfOrFHHMwZnmn-TneMiQB_DBuam4C3gy0uXrNt3&requiressl=yes&dur=478.244&mm=31%2C26&

mn=sn-ab02a0nfpgxapox-jwwe7%2Csn-oguelne7&pl=22&ip=211.237.16.76&

sparams=aitags%2Cclen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&signature

=E9FA7DEB837FF2931C1BBDF8A75CC08AA6381D.553ACDD01BBD44D14946BB8D37C5B285DD807580&gcr=kr

&ipbits=0&expire=1552559810&lmt=1548316020126515&initcwndbps=728750&

aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397&

mime=video%2Fmp4&itag=396&key=yt6&gir=yes&clen=16011686&keepalive=yes&txp=5532432&fvip=2&

ei=YtqJXMbHJKeGs8IPgp6B4AQ&

c=WEB&alr=yes&

cpn=zCV8-pls_I8uiHHw&

cver=2.20190313&

range=0-90603&

altitags=395%2C394&rn=1&rbuf=0

https://r2---sn-ab02a0nfpgxapox-jwwe7.googlevideo.com/videoplayback?source=youtube&ms=au%2Conr&mt=1552538122&

mv=m&id=o-ALgIWMfOrFHHMwZnmn-TneMiQB_DBuam4C3gy0uXrNt3&requiressl=yes&dur=478.244&mm=31%2C26&

mn=sn-ab02a0nfpgxapox-jwwe7%2Csn-oguelne7&pl=22&ip=211.237.16.76&

sparams=aitags%2Cclen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&signature

=E9FA7DEB837FF2931C1BBDF8A75CC08AA6381D.553ACDD01BBD44D14946BB8D37C5B285DD807580&gcr=kr

&ipbits=0&expire=1552559810&lmt=1548316020126515&initcwndbps=728750&

aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397&

mime=video%2Fmp4&itag=396&key=yt6&gir=yes&clen=16011686&keepalive=yes&txp=5532432&fvip=2&

ei=YtqJXMbHJKeGs8IPgp6B4AQ&

c=WEB&alr=yes&

cpn=naxiChjHuGyejORl&

cver=2.20190313&

range=0-90603&

altitags=395%2C394&rn=1&rbuf=0


[링크 : https://www.youtube.com/watch?v=lBSC3rUWGtY]


+

크롬에서 개발자도구로 검색해보니 base.js 에서 cpn을 생성하는 부분을 발견..

Client Playback Nonce 줄여서 cpn

g.h.Wj = function(a) {

        lja(this, a);

        if ("html5.invalidstate" != a.errorCode && "fmt.unplayable" != a.errorCode && "fmt.unparseable" != a.errorCode || !WI(this, a.errorCode, a.details)) {

            var b = /^pp/.test(this.g.clientPlaybackNonce);

            if (kja(a)) {

                a.details.sts = "17968";

                if (YI(this)) {

                    g.U(this.l, 4) || !this.fa("html5_suspended_reload_killswitch") && g.U(this.l, 512) ? (this.Mc = !0, cI(this)) : (this.o && (a.g && (a.details.e = a.errorCode, a.errorCode = "qoe.restart", a.g = !1), this.o.onError(a.errorCode, Tw(a.details))), ZI(this));

                    return

                }

                a: if (!(6048E5 >

                        g.P() - this.A.vh)) {

                    try {

                        window.location.reload(!0);

                        break a

                    } catch (c) {}

                    this.fa("tvhtml5_retire_old_players") && g.Iy(this.A) && aJ(this)

                }

            }

            if ($I(a) && this.g.va && this.g.va.i) {

                if (this.o) this.o.onError(a.errorCode, Tw(a.details));

                this.Ya("highrepfallback", "1", !0);

                !this.fa("html5_hr_logging") && /^hr/.test(this.g.clientPlaybackNonce) && btoa && this.Ya("afmts", btoa(this.g.adaptiveFormats));

                zha(this.g);

                aI(this);

                cI(this);

                VI(this);

                this.playVideo()

            } else a.g ? (b = this.u ? this.u.B.o : null, b = $I(a) && b && b.isLocked() ? "FORMAT_UNAVALIABLE" :

                void 0, g.lI(this, a.errorCode, b, Tw(a.details))) : this.o && (this.o.onError(a.errorCode, Tw(a.details)), b && "manifest.net.connect" == a.errorCode && (a = "https://www.youtube.com/generate_204?cpn=" + this.g.clientPlaybackNonce + "&t=" + g.P(), (new IF(a, "manifest", (0, g.y)(function(c) {

                this.Ya("pathprobe", c)

            }, this), (0, g.y)(function(c) {

                this.onError(c.errorCode, Tw(c.details))

            }, this.o))).send()))

        }

    }; 


Posted by 구차니

댓글을 달아 주세요