mirror of
https://github.com/l1ving/youtube-dl
synced 2024-11-23 00:35:34 +08:00
Every extractor also return it's name.
This commit is contained in:
parent
9bb8dc8e42
commit
be8786a6a4
@ -445,6 +445,7 @@ class YoutubeIE(InfoExtractor):
|
|||||||
video_extension = self._video_extensions.get(format_param, 'flv')
|
video_extension = self._video_extensions.get(format_param, 'flv')
|
||||||
|
|
||||||
results.append({
|
results.append({
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_real_url.decode('utf-8'),
|
'url': video_real_url.decode('utf-8'),
|
||||||
'uploader': video_uploader.decode('utf-8'),
|
'uploader': video_uploader.decode('utf-8'),
|
||||||
@ -578,6 +579,7 @@ class MetacafeIE(InfoExtractor):
|
|||||||
video_uploader = mobj.group(1)
|
video_uploader = mobj.group(1)
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': video_uploader.decode('utf-8'),
|
'uploader': video_uploader.decode('utf-8'),
|
||||||
@ -657,6 +659,7 @@ class DailymotionIE(InfoExtractor):
|
|||||||
video_uploader = mobj.group(1)
|
video_uploader = mobj.group(1)
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': video_uploader.decode('utf-8'),
|
'uploader': video_uploader.decode('utf-8'),
|
||||||
@ -752,6 +755,7 @@ class GoogleIE(InfoExtractor):
|
|||||||
video_thumbnail = ''
|
video_thumbnail = ''
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': u'NA',
|
'uploader': u'NA',
|
||||||
@ -819,6 +823,7 @@ class PhotobucketIE(InfoExtractor):
|
|||||||
video_uploader = mobj.group(2).decode('utf-8')
|
video_uploader = mobj.group(2).decode('utf-8')
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': video_uploader,
|
'uploader': video_uploader,
|
||||||
@ -961,6 +966,7 @@ class YahooIE(InfoExtractor):
|
|||||||
video_url = unescapeHTML(video_url)
|
video_url = unescapeHTML(video_url)
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': video_uploader,
|
'uploader': video_uploader,
|
||||||
@ -1065,6 +1071,7 @@ class VimeoIE(InfoExtractor):
|
|||||||
%(video_id, sig, timestamp, quality, video_codec.upper())
|
%(video_id, sig, timestamp, quality, video_codec.upper())
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': video_uploader,
|
'uploader': video_uploader,
|
||||||
@ -1213,6 +1220,7 @@ class GenericIE(InfoExtractor):
|
|||||||
video_uploader = mobj.group(1).decode('utf-8')
|
video_uploader = mobj.group(1).decode('utf-8')
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_url.decode('utf-8'),
|
'url': video_url.decode('utf-8'),
|
||||||
'uploader': video_uploader,
|
'uploader': video_uploader,
|
||||||
@ -1769,6 +1777,7 @@ class DepositFilesIE(InfoExtractor):
|
|||||||
file_title = mobj.group(1).decode('utf-8')
|
file_title = mobj.group(1).decode('utf-8')
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': file_id.decode('utf-8'),
|
'id': file_id.decode('utf-8'),
|
||||||
'url': file_url.decode('utf-8'),
|
'url': file_url.decode('utf-8'),
|
||||||
'uploader': u'NA',
|
'uploader': u'NA',
|
||||||
@ -1973,6 +1982,7 @@ class FacebookIE(InfoExtractor):
|
|||||||
video_extension = self._video_extensions.get(format_param, 'mp4')
|
video_extension = self._video_extensions.get(format_param, 'mp4')
|
||||||
|
|
||||||
results.append({
|
results.append({
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': video_real_url.decode('utf-8'),
|
'url': video_real_url.decode('utf-8'),
|
||||||
'uploader': video_uploader.decode('utf-8'),
|
'uploader': video_uploader.decode('utf-8'),
|
||||||
@ -2024,6 +2034,7 @@ class BlipTVIE(InfoExtractor):
|
|||||||
ext = ext.replace('.', '')
|
ext = ext.replace('.', '')
|
||||||
self.report_direct_download(title)
|
self.report_direct_download(title)
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': title,
|
'id': title,
|
||||||
'url': url,
|
'url': url,
|
||||||
'title': title,
|
'title': title,
|
||||||
@ -2055,6 +2066,7 @@ class BlipTVIE(InfoExtractor):
|
|||||||
ext = umobj.group(1)
|
ext = umobj.group(1)
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': data['item_id'],
|
'id': data['item_id'],
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': data['display_name'],
|
'uploader': data['display_name'],
|
||||||
@ -2124,6 +2136,7 @@ class MyVideoIE(InfoExtractor):
|
|||||||
video_title = mobj.group(1)
|
video_title = mobj.group(1)
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': u'NA',
|
'uploader': u'NA',
|
||||||
@ -2250,6 +2263,7 @@ class ComedyCentralIE(InfoExtractor):
|
|||||||
|
|
||||||
effTitle = showId + u'-' + epTitle
|
effTitle = showId + u'-' + epTitle
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': shortMediaId,
|
'id': shortMediaId,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': showId,
|
'uploader': showId,
|
||||||
@ -2326,6 +2340,7 @@ class EscapistIE(InfoExtractor):
|
|||||||
videoUrl = playlist[1]['url']
|
videoUrl = playlist[1]['url']
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': videoId,
|
'id': videoId,
|
||||||
'url': videoUrl,
|
'url': videoUrl,
|
||||||
'uploader': showName,
|
'uploader': showName,
|
||||||
@ -2377,6 +2392,7 @@ class CollegeHumorIE(InfoExtractor):
|
|||||||
internal_video_id = m.group('internalvideoid')
|
internal_video_id = m.group('internalvideoid')
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'internal_id': internal_video_id,
|
'internal_id': internal_video_id,
|
||||||
}
|
}
|
||||||
@ -2462,6 +2478,7 @@ class XVideosIE(InfoExtractor):
|
|||||||
video_thumbnail = mobj.group(0).decode('utf-8')
|
video_thumbnail = mobj.group(0).decode('utf-8')
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': None,
|
'uploader': None,
|
||||||
@ -2559,6 +2576,7 @@ class SoundcloudIE(InfoExtractor):
|
|||||||
request = urllib2.Request('http://media.soundcloud.com/crossdomain.xml', std_headers)
|
request = urllib2.Request('http://media.soundcloud.com/crossdomain.xml', std_headers)
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id.decode('utf-8'),
|
'id': video_id.decode('utf-8'),
|
||||||
'url': mediaURL,
|
'url': mediaURL,
|
||||||
'uploader': uploader.decode('utf-8'),
|
'uploader': uploader.decode('utf-8'),
|
||||||
@ -2628,6 +2646,7 @@ class InfoQIE(InfoExtractor):
|
|||||||
video_id, extension = video_filename.split('.')
|
video_id, extension = video_filename.split('.')
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': None,
|
'uploader': None,
|
||||||
@ -2743,6 +2762,7 @@ class MixcloudIE(InfoExtractor):
|
|||||||
format_param = req_format
|
format_param = req_format
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': file_id.decode('utf-8'),
|
'id': file_id.decode('utf-8'),
|
||||||
'url': file_url.decode('utf-8'),
|
'url': file_url.decode('utf-8'),
|
||||||
'uploader': uploader.decode('utf-8'),
|
'uploader': uploader.decode('utf-8'),
|
||||||
@ -2779,6 +2799,7 @@ class StanfordOpenClassroomIE(InfoExtractor):
|
|||||||
course = mobj.group('course')
|
course = mobj.group('course')
|
||||||
video = mobj.group('video')
|
video = mobj.group('video')
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': course + '_' + video,
|
'id': course + '_' + video,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2803,6 +2824,7 @@ class StanfordOpenClassroomIE(InfoExtractor):
|
|||||||
elif mobj.group('course'): # A course page
|
elif mobj.group('course'): # A course page
|
||||||
course = mobj.group('course')
|
course = mobj.group('course')
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': course,
|
'id': course,
|
||||||
'type': 'playlist',
|
'type': 'playlist',
|
||||||
}
|
}
|
||||||
@ -2839,6 +2861,7 @@ class StanfordOpenClassroomIE(InfoExtractor):
|
|||||||
|
|
||||||
else: # Root page
|
else: # Root page
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': 'Stanford OpenClassroom',
|
'id': 'Stanford OpenClassroom',
|
||||||
'type': 'playlist',
|
'type': 'playlist',
|
||||||
}
|
}
|
||||||
@ -2946,6 +2969,7 @@ class MTVIE(InfoExtractor):
|
|||||||
return
|
return
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
|
'provider': IE_NAME,
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': performer,
|
'uploader': performer,
|
||||||
|
Loading…
Reference in New Issue
Block a user