mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-29 21:52:54 +00:00
[openload] raise not found
before executing js
This commit is contained in:
parent
40e41780f1
commit
fcace2d1ad
1 changed files with 4 additions and 2 deletions
|
@ -74,12 +74,14 @@ class OpenloadIE(InfoExtractor):
|
||||||
'User-Agent': self._USER_AGENT,
|
'User-Agent': self._USER_AGENT,
|
||||||
}
|
}
|
||||||
|
|
||||||
phantom = PhantomJSwrapper(self)
|
webpage = self._download_webpage(url, video_id, headers=headers)
|
||||||
webpage, _ = phantom.get(url, video_id=video_id, headers=headers)
|
|
||||||
|
|
||||||
if 'File not found' in webpage or 'deleted by the owner' in webpage:
|
if 'File not found' in webpage or 'deleted by the owner' in webpage:
|
||||||
raise ExtractorError('File not found', expected=True, video_id=video_id)
|
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)
|
decoded_id = get_element_by_id('streamurl', webpage)
|
||||||
|
|
||||||
video_url = 'https://openload.co/stream/%s?mime=true' % decoded_id
|
video_url = 'https://openload.co/stream/%s?mime=true' % decoded_id
|
||||||
|
|
Loading…
Reference in a new issue