aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-10-20 04:18:27 +0800
committerGitHub <noreply@github.com>2016-10-20 04:18:27 +0800
commitad9fd84004d44c30d8b160f24ed1e58a4f95428f (patch)
treef36d4cc45f6d745523dc996c7a43ac824e3db871
parenta81dc8215127b4e9247bc390ade7bcf07b5079c3 (diff)
parent60633ae9a03bd0b7008870509b47800a16969b5f (diff)
Merge pull request #10971 from kasper93/openload
[openload] Fix extraction.
-rw-r--r--youtube_dl/extractor/openload.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py
index 4f5175136..6cf7e4a77 100644
--- a/youtube_dl/extractor/openload.py
+++ b/youtube_dl/extractor/openload.py
@@ -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: