[openload] Fix extraction (closes #16099)
authorSergey M․ <dstftw@gmail.com>
Thu, 5 Apr 2018 16:49:15 +0000 (23:49 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 5 Apr 2018 16:49:15 +0000 (23:49 +0700)
youtube_dl/extractor/openload.py

index af7db6e129eb6cd24c0ae52bebcc796218265b7a..3e0a7a9a2390d66cd528c1245db6e406ef9437a6 100644 (file)
@@ -334,10 +334,11 @@ class OpenloadIE(InfoExtractor):
 
         decoded_id = (get_element_by_id('streamurl', webpage) or
                       get_element_by_id('streamuri', webpage) or
-                      get_element_by_id('streamurj', webpage))
-
-        if not decoded_id:
-            raise ExtractorError('Can\'t find stream URL', video_id=video_id)
+                      get_element_by_id('streamurj', webpage) or
+                      self._search_regex(
+                          (r'>\s*([\da-zA-Z]+~\d{10,}~\d+\.\d+\.0\.0~[\da-zA-Z]+)\s*<',
+                           r'>\s*([\w~]+~\d+\.\d+\.\d+\.\d+~[\w~]+)'), webpage,
+                          'stream URL'))
 
         video_url = 'https://openload.co/stream/%s?mime=true' % decoded_id