]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[openload] Fix extraction.
authorKacper Michajłow <kasper93@gmail.com>
Wed, 19 Oct 2016 20:00:24 +0000 (22:00 +0200)
committerKacper Michajłow <kasper93@gmail.com>
Wed, 19 Oct 2016 20:00:29 +0000 (22:00 +0200)
Fixes #10408

youtube_dl/extractor/openload.py

index 4f5175136bb177f8bf21423a4f7b89fd4c29bbd8..6cf7e4a77a4e92801530489f0092ed489b838e40 100644 (file)
@@ -70,10 +70,15 @@ class OpenloadIE(InfoExtractor):
             r'<span[^>]*>([^<]+)</span>\s*<span[^>]*>[^<]+</span>\s*<span[^>]+id="streamurl"',
             webpage, 'encrypted data')
 
+        magic = compat_ord(enc_data[-1])
         video_url_chars = []
 
         for idx, c in enumerate(enc_data):
             j = compat_ord(c)
+            if j == magic:
+                j -= 1
+            elif j == magic - 1:
+                j += 1
             if j >= 33 and j <= 126:
                 j = ((j + 14) % 94) + 33
             if idx == len(enc_data) - 1: