mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 09:31:01 +01:00
info_dict['player_url'] is used only for rtmpdump, indicate it as optional in the info_dict
This commit is contained in:
parent
717b1f72ed
commit
abe7a3ac2a
@ -43,13 +43,13 @@ class InfoExtractor(object):
|
|||||||
uploader: Nickname of the video uploader.
|
uploader: Nickname of the video uploader.
|
||||||
title: Video title, unescaped.
|
title: Video title, unescaped.
|
||||||
ext: Video filename extension.
|
ext: Video filename extension.
|
||||||
player_url: SWF Player URL (may be None).
|
|
||||||
|
|
||||||
The following fields are optional:
|
The following fields are optional:
|
||||||
|
|
||||||
format: The video format, defaults to ext. Used by --get-format
|
format: The video format, defaults to ext (used for --get-format)
|
||||||
thumbnail: Full URL to a video thumbnail image.
|
thumbnail: Full URL to a video thumbnail image.
|
||||||
description One-line video description.
|
description One-line video description.
|
||||||
|
player_url: SWF Player URL (used for rtmpdump).
|
||||||
|
|
||||||
Subclasses of this one should re-define the _real_initialize() and
|
Subclasses of this one should re-define the _real_initialize() and
|
||||||
_real_extract() methods and define a _VALID_URL regexp.
|
_real_extract() methods and define a _VALID_URL regexp.
|
||||||
@ -620,7 +620,6 @@ def _real_extract(self, url):
|
|||||||
'upload_date': u'NA',
|
'upload_date': u'NA',
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -718,7 +717,6 @@ def _real_extract(self, url):
|
|||||||
'upload_date': video_upload_date,
|
'upload_date': video_upload_date,
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -812,7 +810,6 @@ def _real_extract(self, url):
|
|||||||
'upload_date': u'NA',
|
'upload_date': u'NA',
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -878,7 +875,6 @@ def _real_extract(self, url):
|
|||||||
'upload_date': u'NA',
|
'upload_date': u'NA',
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -1022,7 +1018,6 @@ def _real_extract(self, url, new_video=True):
|
|||||||
'thumbnail': video_thumbnail.decode('utf-8'),
|
'thumbnail': video_thumbnail.decode('utf-8'),
|
||||||
'description': video_description,
|
'description': video_description,
|
||||||
'thumbnail': video_thumbnail,
|
'thumbnail': video_thumbnail,
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -1136,7 +1131,6 @@ def _real_extract(self, url, new_video=True):
|
|||||||
'ext': video_extension,
|
'ext': video_extension,
|
||||||
'thumbnail': video_thumbnail,
|
'thumbnail': video_thumbnail,
|
||||||
'description': video_description,
|
'description': video_description,
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -1282,7 +1276,6 @@ def _real_extract(self, url):
|
|||||||
'upload_date': u'NA',
|
'upload_date': u'NA',
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -1887,7 +1880,6 @@ def _real_extract(self, url):
|
|||||||
'upload_date': u'NA',
|
'upload_date': u'NA',
|
||||||
'title': file_title,
|
'title': file_title,
|
||||||
'ext': file_extension.decode('utf-8'),
|
'ext': file_extension.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
@ -2093,7 +2085,6 @@ def _real_extract(self, url):
|
|||||||
'format': (format_param is None and u'NA' or format_param.decode('utf-8')),
|
'format': (format_param is None and u'NA' or format_param.decode('utf-8')),
|
||||||
'thumbnail': video_thumbnail.decode('utf-8'),
|
'thumbnail': video_thumbnail.decode('utf-8'),
|
||||||
'description': video_description.decode('utf-8'),
|
'description': video_description.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
})
|
})
|
||||||
return results
|
return results
|
||||||
|
|
||||||
@ -2241,7 +2232,6 @@ def _real_extract(self,url):
|
|||||||
'upload_date': u'NA',
|
'upload_date': u'NA',
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'ext': u'flv',
|
'ext': u'flv',
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
class ComedyCentralIE(InfoExtractor):
|
class ComedyCentralIE(InfoExtractor):
|
||||||
@ -2634,7 +2624,6 @@ def _real_extract(self, url):
|
|||||||
'ext': 'flv',
|
'ext': 'flv',
|
||||||
'thumbnail': video_thumbnail,
|
'thumbnail': video_thumbnail,
|
||||||
'description': None,
|
'description': None,
|
||||||
'player_url': None,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [info]
|
return [info]
|
||||||
@ -2728,7 +2717,6 @@ def _real_extract(self, url):
|
|||||||
'upload_date': upload_date,
|
'upload_date': upload_date,
|
||||||
'title': title,
|
'title': title,
|
||||||
'ext': u'mp3',
|
'ext': u'mp3',
|
||||||
'player_url': None,
|
|
||||||
'description': description.decode('utf-8')
|
'description': description.decode('utf-8')
|
||||||
}]
|
}]
|
||||||
|
|
||||||
@ -2798,7 +2786,6 @@ def _real_extract(self, url):
|
|||||||
'ext': extension, # Extension is always(?) mp4, but seems to be flv
|
'ext': extension, # Extension is always(?) mp4, but seems to be flv
|
||||||
'thumbnail': None,
|
'thumbnail': None,
|
||||||
'description': video_description,
|
'description': video_description,
|
||||||
'player_url': None,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [info]
|
return [info]
|
||||||
@ -3289,7 +3276,8 @@ def _real_extract(self, url):
|
|||||||
return
|
return
|
||||||
video_thumbnail = result.group(1).decode('utf-8')
|
video_thumbnail = result.group(1).decode('utf-8')
|
||||||
|
|
||||||
info = {'id': video_id,
|
return [{
|
||||||
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'uploader': None,
|
'uploader': None,
|
||||||
'upload_date': None,
|
'upload_date': None,
|
||||||
@ -3297,9 +3285,7 @@ def _real_extract(self, url):
|
|||||||
'ext': 'flv',
|
'ext': 'flv',
|
||||||
'thumbnail': video_thumbnail,
|
'thumbnail': video_thumbnail,
|
||||||
'description': None,
|
'description': None,
|
||||||
'player_url': None}
|
}]
|
||||||
|
|
||||||
return [info]
|
|
||||||
|
|
||||||
|
|
||||||
class GooglePlusIE(InfoExtractor):
|
class GooglePlusIE(InfoExtractor):
|
||||||
@ -3421,5 +3407,4 @@ def _real_extract(self, url):
|
|||||||
'upload_date': upload_date.decode('utf-8'),
|
'upload_date': upload_date.decode('utf-8'),
|
||||||
'title': video_title.decode('utf-8'),
|
'title': video_title.decode('utf-8'),
|
||||||
'ext': video_extension.decode('utf-8'),
|
'ext': video_extension.decode('utf-8'),
|
||||||
'player_url': None,
|
|
||||||
}]
|
}]
|
||||||
|
Loading…
Reference in New Issue
Block a user