- formats = [
- {
- 'format': fdata['format'],
- 'url': 'http://' + data['server'] + data['dir'] + fn,
- 'file_size': int(fdata['size']),
- }
- for fn, fdata in data['files'].items()
- if 'Video' in fdata['format']]
-
- self._sort_formats(formats)
-
- return {
- '_type': 'video',
- 'id': video_id,
- 'title': title,
- 'formats': formats,
- 'description': description,
- 'uploader': uploader,
- 'upload_date': upload_date,
- 'thumbnail': data.get('misc', {}).get('image'),
- }
+ metadata = self._download_json(
+ 'http://archive.org/details/' + video_id, video_id, query={
+ 'output': 'json',
+ })['metadata']
+ info.update({
+ 'title': get_optional(metadata, 'title') or info.get('title'),
+ 'description': clean_html(get_optional(metadata, 'description')),
+ })
+ if info.get('_type') != 'playlist':
+ info.update({
+ 'uploader': get_optional(metadata, 'creator'),
+ 'upload_date': unified_strdate(get_optional(metadata, 'date')),
+ })
+ return info