diff options
author | Vijay Singh <sudovijay@users.noreply.github.com> | 2017-01-08 22:27:28 +0530 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-01-13 23:40:19 +0700 |
commit | 06e9363b7a21acf6a592780a706b0fdd6b5a2d4e (patch) | |
tree | 8e59ab753e8e148d391ff3c1650befb57f7eeb4d | |
parent | 1f393a324191591d895bafc1e4c756951f368b3c (diff) |
[openload] Fix extraction (closes #10408)
Just a minor fix for openload
-rw-r--r-- | youtube_dl/extractor/openload.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index 2ce9f3826..3d4ad7dca 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -64,16 +64,17 @@ class OpenloadIE(InfoExtractor): raise ExtractorError('File not found', expected=True) ol_id = self._search_regex( - '<span[^>]+id="[a-zA-Z0-9]+x"[^>]*>([0-9]+)</span>', + '<span[^>]+id="[^"]+"[^>]*>([0-9]+)</span>', webpage, 'openload ID') - first_two_chars = int(float(ol_id[0:][:2])) + first_three_chars = int(float(ol_id[0:][:3])) + fifth_char = int(float(ol_id[3:5])) urlcode = '' - num = 2 + num = 5 while num < len(ol_id): - urlcode += compat_chr(int(float(ol_id[num:][:3])) - - first_two_chars * int(float(ol_id[num + 3:][:2]))) + urlcode += compat_chr(int(float(ol_id[num:][:3])) + + first_three_chars - fifth_char * int(float(ol_id[num + 3:][:2]))) num += 5 video_url = 'https://openload.co/stream/' + urlcode |