2
0
Эх сурвалжийг харах

use url instead of single formats entry

Peter Rowlands 9 жил өмнө
parent
commit
22e35adefd

+ 2 - 2
youtube_dl/extractor/afreecatv.py

@@ -58,7 +58,7 @@ class AfreecaTVIE(InfoExtractor):
                 'id': video_file.get('key'),
                 'id': video_file.get('key'),
                 'title': title,
                 'title': title,
                 'duration': int_or_none(video_file.get('duration')),
                 'duration': int_or_none(video_file.get('duration')),
-                'formats': [{'url': video_file.text}]
+                'url': video_file.text,
             })
             })
 
 
         info = {
         info = {
@@ -74,7 +74,7 @@ class AfreecaTVIE(InfoExtractor):
             info['_type'] = 'multi_video'
             info['_type'] = 'multi_video'
             info['entries'] = entries
             info['entries'] = entries
         elif len(entries) == 1:
         elif len(entries) == 1:
-            info['formats'] = entries[0]['formats']
+            info['url'] = entries[0]['url']
         else:
         else:
             raise ExtractorError(
             raise ExtractorError(
                 'No files found for the specified AfreecaTV video, either'
                 'No files found for the specified AfreecaTV video, either'