[openload] raise `not found` before executing js
authorTithen-Firion <tithen.firion.0@gmail.com>
Sat, 29 Apr 2017 08:30:45 +0000 (10:30 +0200)
committerTithen-Firion <tithen.firion.0@gmail.com>
Sat, 29 Apr 2017 08:30:45 +0000 (10:30 +0200)
youtube_dl/extractor/openload.py

index ac5e0bb08afd84602720d9525a27e63aac84e4c4..0adf177658ac2e0cb68b9b05972426a15f18cf66 100644 (file)
@@ -74,12 +74,14 @@ class OpenloadIE(InfoExtractor):
             'User-Agent': self._USER_AGENT,
         }
 
-        phantom = PhantomJSwrapper(self)
-        webpage, _ = phantom.get(url, video_id=video_id, headers=headers)
+        webpage = self._download_webpage(url, video_id, headers=headers)
 
         if 'File not found' in webpage or 'deleted by the owner' in webpage:
             raise ExtractorError('File not found', expected=True, video_id=video_id)
 
+        phantom = PhantomJSwrapper(self)
+        webpage, _ = phantom.get(url, html=webpage, video_id=video_id, headers=headers)
+
         decoded_id = get_element_by_id('streamurl', webpage)
 
         video_url = 'https://openload.co/stream/%s?mime=true' % decoded_id