Fixes issue with OpenLoad where /embed/ link shows file as deleted but /f/ does not
This commit is contained in:
zach-martin 2017-11-29 18:33:01 -06:00
parent 1663b32946
commit 3716342ad4

View File

@ -302,12 +302,16 @@ class OpenloadIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
url = 'https://openload.co/embed/%s/' % video_id
url2 = 'https://openload.co/f/%s/' % video_id
headers = {
'User-Agent': self._USER_AGENT,
}
webpage = self._download_webpage(url, video_id, headers=headers)
if 'File not found' in webpage or 'deleted by the owner' in webpage:
url = url2
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)