]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Merge pull request #10971 from kasper93/openload
authorYen Chi Hsuan <yan12125@gmail.com>
Wed, 19 Oct 2016 20:18:27 +0000 (04:18 +0800)
committerGitHub <noreply@github.com>
Wed, 19 Oct 2016 20:18:27 +0000 (04:18 +0800)
[openload] Fix extraction.

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: