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

[openload] Fix extraction. #10971

Merged
merged 1 commit into from
Oct 19, 2016
Merged

[openload] Fix extraction. #10971

merged 1 commit into from
Oct 19, 2016

Conversation

kasper93
Copy link
Contributor

@kasper93 kasper93 commented Oct 19, 2016

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

They changed "decryption" code a little. Here is current one.

var y = $("#yJ7n4OuuU7").text();
var magic = y.slice(-1).charCodeAt(0);
y = y.split(String.fromCharCode(magic - 1)).join("  ");
y = y.split(y.slice(-1)).join(String.fromCharCode(magic - 1));
y = y.split("   ").join(String.fromCharCode(magic));
var s = [];
for (var i = 0; i < y.length; i++) {
  var j = y.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 str = tmp.substring(0, tmp.length - 1) + String.fromCharCode(tmp.slice(-1).charCodeAt(0) + 2);

They've added (funny code if you ask me)

var magic = y.slice(-1).charCodeAt(0);
y = y.split(String.fromCharCode(magic - 1)).join("  ");
y = y.split(y.slice(-1)).join(String.fromCharCode(magic - 1));
y = y.split("   ").join(String.fromCharCode(magic));

I wonder what they are trying to achieve by doing such stupid obfuscation.

I adopted those changes, let's see how long it will be working this time :)

Fixes #10408

@yan12125 yan12125 merged commit ad9fd84 into ytdl-org:master Oct 19, 2016
@yan12125
Copy link
Collaborator

You are SOOOOO fast :-)

yan12125 pushed a commit that referenced this pull request Oct 19, 2016
@dstftw
Copy link
Collaborator

dstftw commented Oct 19, 2016

@yan12125 FYI there are Rebase and merge and Squash and merge auto options available in GitHub merge interface for quite some time already which don't introduce merge commit keeping git log cleaner.

@yan12125
Copy link
Collaborator

@dstftw Thanks I know those options. My personal preferences is keeping commit IDs unchanged across repositories. For example kasper93@60633ae is landed as 60633ae. This introduces fewer surprises when tracing the history.
PS: I admit it's more a mercurial mindset than a git one. If you think merge commits are too noisy I can change my convention in youtube-dl.

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

Successfully merging this pull request may close these issues.

openload.co extractor not working
3 participants