Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube Sep18 Sig changes #25

Merged
merged 1 commit into from Dec 25, 2018

Conversation

@arjunae
Copy link
Contributor

commented Oct 15, 2018

.... Forked the same repo a while ago and implemented the Signature change needed for youtubes sep18 base.js updates.
Feel free to use them too.

@FaArIsH FaArIsH referenced this pull request Oct 15, 2018
@FaArIsH

This comment has been minimized.

Copy link

commented Oct 16, 2018

360p and lower working

@sanishan

This comment has been minimized.

Copy link

commented Oct 18, 2018

anyone find a solution to work with HD video?

@mRYanna

This comment has been minimized.

Copy link

commented Nov 15, 2018

@arjunae Youtube changed the cipher again. Can you edit this patch to comply those changes please. Thanks...

@arjunae

This comment has been minimized.

Copy link
Contributor Author

commented Nov 16, 2018

Yo: Confirmed. But as Youtube seems to change their stuff now on a regular, nearly Monthly base, i dont really feel that i like to do so. Here are some steps so anyone interested can use to find the new positions:

  1. start a youtube video - view html-source - search for the string /jsbin/player
  2. download or view above found player.js version :
    view-source:https://www.youtube.com/yts/jsbin/player-vflmQAIkc/de_DE/base.js
  3. begin at last youtube changes Position - which also introduced "yt.akamaized.net"
  4. look at the stuff called after : "d.set(b,(0,window.encodeURIComponent)(pL((0,window.decodeURIComponent)(c))));return d};"
  5. find && analyze the function names b, pL , c (eg search for stuff like bL=function)
  6. doin that, youll find
    pL=function(a){a=a.split("");oL.uD(a,31);oL.iZ(a,39);oL.uD(a,1);return a.join("")};
    which seems quite similar to what was called before the change:
    bL=function(a){a=a.split("");aL.jl(a,58);aL.NI(a,2);aL.l5(a,35);aL.NI(a,2);aL.jl(a,45);aL.l5(a,4);aL.jl(a,46);return a.join("")};
  7. havin verified the (otherwise meaningless) functions name - pL lets change the first regexp to match the changed function call in 4)
    d.set("alr","yes");c&&d.set(b,bL(c));return d};
    changed to:
    d.set(b,(0,window.encodeURIComponent)(pL((0,window.decodeURIComponent)(c))));return d};
  8. so all you need to do will be adapting the regexps prefix:
    $prefix ="/\W*.*;\w&&\w.set(\w,/";
    to include the added braces.

Add: you will need to read into writeing regexps. but thers much easy to understand docs on the net so:
Happy Hacking!...

@Athlon1600 Athlon1600 merged commit f8d0706 into Athlon1600:master Dec 25, 2018
@Athlon1600

This comment has been minimized.

Copy link
Owner

commented Dec 27, 2018

^ That's basically it.

I made the fix:
a2c1e1c

Check the links from the Demo section. They're working now.

@crsurfer

This comment has been minimized.

Copy link

commented Mar 3, 2019

hey@Athlon1600
1- thanks for creating this script!
2- I'm trying to run this script but I can't get it to work properly. I get:

Invalid argument supplied for foreach()
foreach ($instructions as $opt) {
line 182

@Athlon1600

This comment has been minimized.

Copy link
Owner

commented Mar 3, 2019

^ that was fixed here:
cf7f863

do: composer update to get the latest version

@crsurfer

This comment has been minimized.

Copy link

commented Mar 3, 2019

thanks @Athlon1600, I don't know much about packages but if I do composer update, it doesn't really update the file. but for testing I did copy the code you had in that reference and worked. now I'm getting the URL, but I can't download any video ( access denied )

also this url : https://api.unblockvideos.com/youtube_downloader?id=4Ai63AkrZDk&selector=mp4&redirect=true has an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.