]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[openload] Fix extraction (closes #10408, closes #10727)
authorYen Chi Hsuan <yan12125@gmail.com>
Thu, 22 Sep 2016 17:47:01 +0000 (01:47 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Thu, 22 Sep 2016 17:47:51 +0000 (01:47 +0800)
Thanks to @daniel100097 for providing a working version

ChangeLog
youtube_dl/extractor/openload.py

index 5122af4c0e351106ad6ce77902790963a4914135..6c72bae90225ba068dca52dbbde59b3a8f2029d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 version <unreleased>
 
 Extractors
+* [openload] Fix extraction (#10408)
 + [ustream] Support the new HLS streams (#10698)
 
 version 2016.09.19
index c261a7455b37e0967aa1540dccce56c5db7cf30f..b6e3ac25037656547974011d1dfffbf67694ad9d 100644 (file)
@@ -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)