]> Raphaƫl G. Git Repositories - youtubedl/blobdiff - youtube_dl/extractor/archiveorg.py
Merge tag 'upstream/2013.12.04'
[youtubedl] / youtube_dl / extractor / archiveorg.py
index 7efd1d82324c5397bb6d6f10e1bfa993a2531584..3ae0aebb1275f0a4b1bed0c1dda3d969c0672a87 100644 (file)
@@ -46,8 +46,10 @@ class ArchiveOrgIE(InfoExtractor):
             for fn,fdata in data['files'].items()
             if 'Video' in fdata['format']]
         formats.sort(key=lambda fdata: fdata['file_size'])
+        for f in formats:
+            f['ext'] = determine_ext(f['url'])
 
-        info = {
+        return {
             '_type': 'video',
             'id': video_id,
             'title': title,
@@ -55,13 +57,5 @@ class ArchiveOrgIE(InfoExtractor):
             'description': description,
             'uploader': uploader,
             'upload_date': upload_date,
+            'thumbnail': data.get('misc', {}).get('image'),
         }
-        thumbnail = data.get('misc', {}).get('image')
-        if thumbnail:
-            info['thumbnail'] = thumbnail
-
-        # TODO: Remove when #980 has been merged
-        info['url'] = formats[-1]['url']
-        info['ext'] = determine_ext(formats[-1]['url'])
-
-        return info
\ No newline at end of file