aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-09-23 01:47:01 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-09-23 01:47:51 +0800
commit4ddcb5999d0323fb83c5b879127d31763f5d63e2 (patch)
treec2c3153a481207ca831c53f630a3354af1dcb27f /youtube_dl/extractor
parent628406db960c032eb68ef318ce9fecf6b8329834 (diff)
downloadyoutube-dl-4ddcb5999d0323fb83c5b879127d31763f5d63e2.tar.xz
[openload] Fix extraction (closes #10408, closes #10727)
Thanks to @daniel100097 for providing a working version
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/openload.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py
index c261a7455..b6e3ac250 100644
--- a/youtube_dl/extractor/openload.py
+++ b/youtube_dl/extractor/openload.py
@@ -51,7 +51,8 @@ class OpenloadIE(InfoExtractor):
# declared to be freely used in youtube-dl
# See https://github.com/rg3/youtube-dl/issues/10408
enc_data = self._html_search_regex(
- r'<span[^>]+id="hiddenurl"[^>]*>([^<]+)</span>', webpage, 'encrypted data')
+ r'<span[^>]*>([^<]+)</span>\s*<span[^>]*>[^<]+</span>\s*<span[^>]+id="streamurl"',
+ webpage, 'encrypted data')
video_url_chars = []
@@ -60,7 +61,7 @@ class OpenloadIE(InfoExtractor):
if j >= 33 and j <= 126:
j = ((j + 14) % 94) + 33
if idx == len(enc_data) - 1:
- j += 3
+ j += 2
video_url_chars += compat_chr(j)
video_url = 'https://openload.co/stream/%s?mime=true' % ''.join(video_url_chars)