mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Moved redtube info extractor to the end
This commit is contained in:
parent
815dd2ffa8
commit
5e34d2ebbf
1 changed files with 34 additions and 34 deletions
|
@ -779,39 +779,6 @@ def _real_extract(self, url):
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
}]
|
}]
|
||||||
|
|
||||||
class RedtubeIE(InfoExtractor):
|
|
||||||
"""Information Extractor for redtube"""
|
|
||||||
_VALID_URL = r'(?:http://)?(?:www\.)?redtube\.com/(?P<id>[0-9]+)'
|
|
||||||
IE_NAME = u'redtube'
|
|
||||||
|
|
||||||
def _real_extract(self,url):
|
|
||||||
mobj = re.match(self._VALID_URL, url)
|
|
||||||
if mobj is None:
|
|
||||||
self._downloader.report_error(u'invalid URL: %s' % url)
|
|
||||||
return
|
|
||||||
video_id = mobj.group('id')
|
|
||||||
video_extension = 'mp4'
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
|
||||||
self.report_extraction(video_id)
|
|
||||||
mobj = re.search(r'<source src="'+'(.+)'+'" type="video/mp4">',webpage)
|
|
||||||
if mobj is not None:
|
|
||||||
video_url = mobj.group(1)
|
|
||||||
else:
|
|
||||||
self._downloader.report_error(u'unable to extract media URL')
|
|
||||||
return
|
|
||||||
mobj = re.search('<h1 class="videoTitle slidePanelMovable">'+r'(.+)'+r'</h1>',webpage)
|
|
||||||
if mobj is not None:
|
|
||||||
video_title = mobj.group(1)
|
|
||||||
else:
|
|
||||||
video_title = 'Redtube - %s' % time.ctime()
|
|
||||||
|
|
||||||
return [{
|
|
||||||
'id': video_id,
|
|
||||||
'url': video_url,
|
|
||||||
'ext': video_extension,
|
|
||||||
'title': video_title,
|
|
||||||
}]
|
|
||||||
|
|
||||||
class DailymotionIE(InfoExtractor):
|
class DailymotionIE(InfoExtractor):
|
||||||
"""Information Extractor for Dailymotion"""
|
"""Information Extractor for Dailymotion"""
|
||||||
|
|
||||||
|
@ -4216,6 +4183,39 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
return [track_info]
|
return [track_info]
|
||||||
|
|
||||||
|
class RedtubeIE(InfoExtractor):
|
||||||
|
"""Information Extractor for redtube"""
|
||||||
|
_VALID_URL = r'(?:http://)?(?:www\.)?redtube\.com/(?P<id>[0-9]+)'
|
||||||
|
IE_NAME = u'redtube'
|
||||||
|
|
||||||
|
def _real_extract(self,url):
|
||||||
|
mobj = re.match(self._VALID_URL, url)
|
||||||
|
if mobj is None:
|
||||||
|
self._downloader.report_error(u'invalid URL: %s' % url)
|
||||||
|
return
|
||||||
|
video_id = mobj.group('id')
|
||||||
|
video_extension = 'mp4'
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
self.report_extraction(video_id)
|
||||||
|
mobj = re.search(r'<source src="'+'(.+)'+'" type="video/mp4">',webpage)
|
||||||
|
if mobj is not None:
|
||||||
|
video_url = mobj.group(1)
|
||||||
|
else:
|
||||||
|
self._downloader.report_error(u'unable to extract media URL')
|
||||||
|
return
|
||||||
|
mobj = re.search('<h1 class="videoTitle slidePanelMovable">'+r'(.+)'+r'</h1>',webpage)
|
||||||
|
if mobj is not None:
|
||||||
|
video_title = mobj.group(1)
|
||||||
|
else:
|
||||||
|
video_title = 'Redtube - %s' % time.ctime()
|
||||||
|
|
||||||
|
return [{
|
||||||
|
'id': video_id,
|
||||||
|
'url': video_url,
|
||||||
|
'ext': video_extension,
|
||||||
|
'title': video_title,
|
||||||
|
}]
|
||||||
|
|
||||||
|
|
||||||
def gen_extractors():
|
def gen_extractors():
|
||||||
""" Return a list of an instance of every supported extractor.
|
""" Return a list of an instance of every supported extractor.
|
||||||
|
@ -4268,11 +4268,11 @@ def gen_extractors():
|
||||||
TEDIE(),
|
TEDIE(),
|
||||||
MySpassIE(),
|
MySpassIE(),
|
||||||
SpiegelIE(),
|
SpiegelIE(),
|
||||||
RedtubeIE(),
|
|
||||||
LiveLeakIE(),
|
LiveLeakIE(),
|
||||||
ARDIE(),
|
ARDIE(),
|
||||||
TumblrIE(),
|
TumblrIE(),
|
||||||
BandcampIE(),
|
BandcampIE(),
|
||||||
|
RedtubeIE(),
|
||||||
GenericIE()
|
GenericIE()
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue