diff options
author | denneboomyo <denis_b555@freenet.de> | 2017-03-07 23:01:27 +0100 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2017-03-08 06:01:27 +0800 |
commit | b08cc749d6e1a3078d807580c424437bca143b73 (patch) | |
tree | ddd3388450e4ebfb495ee9265538fc3d85936a92 /youtube_dl/extractor/openload.py | |
parent | b68a812ea839e44148516a34a15193189e58ba77 (diff) |
[openload] Fix extraction
Diffstat (limited to 'youtube_dl/extractor/openload.py')
-rw-r--r-- | youtube_dl/extractor/openload.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index 25f6a9aca..5a5607357 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -78,10 +78,10 @@ class OpenloadIE(InfoExtractor): video_url_chars = [] first_char = ord(ol_id[0]) - key = first_char - 55 + key = first_char - 50 maxKey = max(2, key) - key = min(maxKey, len(ol_id) - 14) - t = ol_id[key:key + 12] + key = min(maxKey, len(ol_id) - 22) + t = ol_id[key:key + 20] hashMap = {} v = ol_id.replace(t, "") @@ -98,8 +98,9 @@ class OpenloadIE(InfoExtractor): while h < len(v): B = v[h:h + 2] i = int(B, 16) - index = (h / 2) % 6 + index = (h / 2) % 10 A = hashMap[index] + i = i ^ 137 i = i ^ A video_url_chars.append(compat_chr(i)) h += 2 |