[dailymotion] use the normal HTTP 302 redirect
This commit is contained in:
parent
bc4a20a236
commit
20423b8cf6
@ -380,11 +380,6 @@ class DailymotionCloudIE(DailymotionBaseInfoExtractor):
|
|||||||
if mobj:
|
if mobj:
|
||||||
return mobj.group(1)
|
return mobj.group(1)
|
||||||
|
|
||||||
def redirect(self, url, video_id):
|
|
||||||
if re.match(r'https?://.*cdn.*\.dmcloud\.net/route/', url):
|
|
||||||
return self._download_webpage(url + '&redirect=0', video_id).strip()
|
|
||||||
return url
|
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
@ -397,12 +392,14 @@ class DailymotionCloudIE(DailymotionBaseInfoExtractor):
|
|||||||
|
|
||||||
is_live = video_info['mode'] == 'live'
|
is_live = video_info['mode'] == 'live'
|
||||||
|
|
||||||
formats = self._extract_m3u8_formats(self.redirect(video_info['ios_url'], video_id), video_id)
|
ios_url = video_info['ios_url']
|
||||||
|
if '.m3u8' in ios_url:
|
||||||
|
formats = self._extract_m3u8_formats(ios_url, video_id)
|
||||||
|
|
||||||
if is_live:
|
if is_live:
|
||||||
title = self._live_title(title)
|
title = self._live_title(title)
|
||||||
else:
|
else:
|
||||||
formats.append({'url': self.redirect(video_info['mp4_url'], video_id), 'format_id': 'mp4'})
|
formats.append({'url': video_info['mp4_url'], 'format_id': 'mp4'})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user