Skip to content

Commit

Permalink
Merge pull request #10971 from kasper93/openload
Browse files Browse the repository at this point in the history
[openload] Fix extraction.
  • Loading branch information
Yen Chi Hsuan authored Oct 19, 2016
2 parents a81dc82 + 60633ae commit ad9fd84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions youtube_dl/extractor/openload.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,15 @@ def _real_extract(self, url):
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:
Expand Down

0 comments on commit ad9fd84

Please sign in to comment.