diff options
author | Tithen-Firion <tithen.firion.0@gmail.com> | 2017-04-29 10:30:45 +0200 |
---|---|---|
committer | Tithen-Firion <tithen.firion.0@gmail.com> | 2017-04-29 10:30:45 +0200 |
commit | fcace2d1adac5d1f306b22219fde3a4542bcd719 (patch) | |
tree | dc90423b7dcc7e10176c191173fd58068c8bcbc2 /youtube_dl/extractor/openload.py | |
parent | 40e41780f1d770a355f01e3c1e6fb09ff392f97e (diff) |
[openload] raise `not found` before executing js
Diffstat (limited to 'youtube_dl/extractor/openload.py')
-rw-r--r-- | youtube_dl/extractor/openload.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index ac5e0bb08..0adf17765 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -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 |