diff options
author | Remita Amine <remitamine@gmail.com> | 2017-02-24 11:21:13 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2017-02-24 11:21:58 +0100 |
commit | 39e7277ed16c1647d636c766d57870121f5f2d68 (patch) | |
tree | 3f75b5bb737ee4903bc6f8cfc0c8fbc8663061f0 /youtube_dl/extractor | |
parent | 42dcdbe11cd738e6b196bc9c14b746a71d61de5c (diff) | |
download | youtube-dl-39e7277ed16c1647d636c766d57870121f5f2d68.zip youtube-dl-39e7277ed16c1647d636c766d57870121f5f2d68.tar.gz youtube-dl-39e7277ed16c1647d636c766d57870121f5f2d68.tar.bz2 |
[openload] fix extraction(closes #10408)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/openload.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index 10896c4..fc7ff43 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -72,16 +72,21 @@ class OpenloadIE(InfoExtractor): raise ExtractorError('File not found', expected=True) ol_id = self._search_regex( - '<span[^>]+id="[^"]+"[^>]*>([0-9]+)</span>', + '<span[^>]+id="[^"]+"[^>]*>([0-9A-Za-z]+)</span>', webpage, 'openload ID') - first_two_chars = int(float(ol_id[0:][:2])) + first_char = int(ol_id[0]) urlcode = [] - num = 2 + num = 1 while num < len(ol_id): - key = int(float(ol_id[num + 3:][:2])) - urlcode.append((key, compat_chr(int(float(ol_id[num:][:3])) - first_two_chars))) + i = ord(ol_id[num]) + key = 0 + if i <= 90: + key = i - 65 + elif i >= 97: + key = 25 + i - 97 + urlcode.append((key, compat_chr(int(ol_id[num + 2:num + 5]) // int(ol_id[num + 1]) - first_char))) num += 5 video_url = 'https://openload.co/stream/' + ''.join( |