]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[meta] Make duration and description optional
authorSergey M․ <dstftw@gmail.com>
Thu, 30 Jun 2016 16:06:13 +0000 (23:06 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 30 Jun 2016 16:06:13 +0000 (23:06 +0700)
For iframe URLs

youtube_dl/extractor/meta.py

index 2ca7092e5199211a944e2b2f87b0c07f47364003..2e2db5620275c1d45e8d6494e7c2783009c88e46 100644 (file)
@@ -47,9 +47,10 @@ class METAIE(InfoExtractor):
             'id': video_id,
             'url': video_url,
             'title': uppod_data.get('comment') or self._og_search_title(webpage),
-            'description': self._og_search_description(webpage),
+            'description': self._og_search_description(webpage, default=None),
             'thumbnail': uppod_data.get('poster') or self._og_search_thumbnail(webpage),
-            'duration': int_or_none(self._og_search_property('video:duration', webpage)),
+            'duration': int_or_none(self._og_search_property(
+                'video:duration', webpage, default=None)),
         }
         if 'youtube.com/' in video_url:
             info.update({