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

Fix openload.co #10727

Closed
daniel100097 opened this issue Sep 22, 2016 · 14 comments
Closed

Fix openload.co #10727

daniel100097 opened this issue Sep 22, 2016 · 14 comments

Comments

@daniel100097
Copy link

@daniel100097 daniel100097 commented Sep 22, 2016

code fix for openload.co resolv
http://hastebin.com/femivusima.py

parts of the code can be use in youtube-dl

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 22, 2016

Are you the original author of this code? If so could you declare this script to be in public domain or released with UNLICENSE, the license youtube-dl uses.

@daniel100097
Copy link
Author

@daniel100097 daniel100097 commented Sep 22, 2016

Yes i'm the original author of this code. how can i declare the code as public ?
(youtube-dl can use the code)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 22, 2016

An approach is like this: https://gist.github.com/gdkchan/2f88297203cd3189a41893e366faba8b - put a comment block in the file.

@aminpaks
Copy link

@aminpaks aminpaks commented Sep 22, 2016

Not working anymore, Openload has changed its contents again,
Now the encryptions are inside of DIV

<div style="display:none;">
<span id="zuBCRW4KWj">57H=D?&lt;v|vHO`cfcebgcabO`bg]aah]_]_OG|&amp;=cf=v</span>
<span id="zuBCRW4KWjx">57H=D?&lt;v|vHO`cfcebgcabO`bg]aah]_]_OG|&amp;=cf=)</span>
<span id="streamurl">HERE IS THE LINK</span>
</div>

And the encode function doesn't work, at least I couldn't get the correct result with it.

@daniel100097
Copy link
Author

@daniel100097 daniel100097 commented Sep 22, 2016

@aminpaks
Copy link

@aminpaks aminpaks commented Sep 22, 2016

You're right, I found openload algorithm on their website, and yours is its equivalent.
Not sure why didn't work in the first try!

This is OPENLOAD algorithm:

// OpenLoad algorithm written in JavaScript

// Encrypted stream info
var x = 'v;&>ACB&}$gO`cfcebhgdhO`bg]aah]_]_Ou$\d\'v!3';
// Rotation
var s=[];
for (var i=0;i<x.length;i++){
  var j=x.charCodeAt(i);
  if ((j>=33)&&(j<=126)){
    s[i]=String.fromCharCode(33+((j+14)%94));
  } else {
    s[i]=String.fromCharCode(j);
  }
}
var tmp=s.join("");
var unecrypted_str = tmp.substring(0, tmp.length - 1) + String.fromCharCode(tmp.slice(-1).charCodeAt(0) + 2);

Thanks.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 22, 2016

Thanks you all! I've adapted the algorithm into youtube-dl.

@JustMeDaFaq
Copy link

@JustMeDaFaq JustMeDaFaq commented Sep 23, 2016

Is it just me, or did they changed it again? Following doesnt work anymore, lol.

// OpenLoad algorithm written in JavaScript

// Encrypted stream info
var x = 'v;&>ACB&}$gOcfcebhgdhObg]aah]_]_Ou$\d'v!3';
// Rotation
var s=[];
for (var i=0;i<x.length;i++){
var j=x.charCodeAt(i);
if ((j>=33)&&(j<=126)){
s[i]=String.fromCharCode(33+((j+14)%94));
} else {
s[i]=String.fromCharCode(j);
}
}
var tmp=s.join("");
var unecrypted_str = tmp.substring(0, tmp.length - 1) + String.fromCharCode(tmp.slice(-1).charCodeAt(0) + 2);

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 23, 2016

@JustMeDaFaq The latest commit of youtube-dl is still working. Didn't check it thoroughly, though.

@JustMeDaFaq
Copy link

@JustMeDaFaq JustMeDaFaq commented Sep 23, 2016

C:\Users\XXXX\Downloads>youtube-dl https://openload.co/embed/2hoEy3X94as/The.Simpsons.S27E22.HDTV.x264-FLEET.mkv
[Openload] 2hoEy3X94as: Downloading webpage
ERROR: Unable to extract encrypted data; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

-> Looks like broken :/

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 23, 2016

Works with commit 4ddcb59 or newer:

$ youtube-dl -v "https://openload.co/embed/2hoEy3X94as/The.Simpsons.S27E22.HDTV.x264-FLEET.mkv" 
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'https://openload.co/embed/2hoEy3X94as/The.Simpsons.S27E22.HDTV.x264-FLEET.mkv']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.09.19
[debug] Git HEAD: 71ad00c
[debug] Python version 3.5.2 - Linux-4.7.4-1-ARCH-x86_64-with-arch
[debug] exe versions: avconv v12_dev0-3198-g75d98e3, avprobe v12_dev0-3198-g75d98e3, ffmpeg 3.1.3, ffprobe 3.1.3, rtmpdump 2.4
[debug] Proxy map: {}
[Openload] 2hoEy3X94as: Downloading webpage
[debug] Invoking downloader on 'https://openload.co/stream/2hoEy3X94as~1474744110~140.112.0.0~HrgqkB0K?mime=true'
[download] Destination: The.Simpsons.S27E22.HDTV.x264-FLEET.mkv.mp4-2hoEy3X94as.mp4
[download]   6.2% of 127.79MiB at 221.68KiB/s ETA 09:13^CException ignored in: <_io.FileIO name='The.Simpsons.S27E22.HDTV.x264-FLEET.mkv.mp4-2hoEy3X94as.mp4.part' mode='wb' closefd=True>
ResourceWarning: unclosed file <_io.BufferedWriter name='The.Simpsons.S27E22.HDTV.x264-FLEET.mkv.mp4-2hoEy3X94as.mp4.part'>

ERROR: Interrupted by user

The latest fix is not included in the latest version yet. If you can't wait, have a look at https://github.com/rg3/youtube-dl/blob/master/README.md#developer-instructions for how to get the latest commit.

@Hrxn
Copy link

@Hrxn Hrxn commented Sep 23, 2016

In my opinion, the developer instructions are slightly overkill for just running youtube-dl.
You don't need any build tools for this or git on your system.

You can get the latest version directly from the tree, like this:
1

This is all you need, the full program, Python source code.
Only requirement is Python on your system. If you run any Linux distribution, you should already have it. Otherwise, install via your package manager. OS X should ship with it as well, if not, installers for OS X - and Windows - are here: https://www.python.org/downloads/

NB: If you are on Windows, you don't actually need to install anything, just unpack the Python interpreter to a directory and run the executable from there.
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 23, 2016

@Hrxn thanks for those instructions. Maybe it's time to add a section or an FAQ entry in README.md for cutting-edge fans as well as testers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.