Make tbr field 'int' rather than 'tuple'
[youtube-dl] / youtube_dl / extractor / brightcove.py
index f9056f5145c4a7e1f3f8d1a67596b920da7c8fb8..f0781fc273a18ec30c1ffa97546232d991ad8574 100644 (file)
@@ -307,13 +307,14 @@ class BrightcoveLegacyIE(InfoExtractor):
                                     playlist_title=playlist_info['mediaCollectionDTO']['displayName'])
 
     def _extract_video_info(self, video_info):
+        publisher_id = video_info.get('publisherId')
         info = {
             'id': compat_str(video_info['id']),
             'title': video_info['displayName'].strip(),
             'description': video_info.get('shortDescription'),
             'thumbnail': video_info.get('videoStillURL') or video_info.get('thumbnailURL'),
             'uploader': video_info.get('publisherName'),
-            'uploader_id': compat_str(video_info.get('publisherId')),
+            'uploader_id': compat_str(publisher_id) if publisher_id else None,
             'duration': float_or_none(video_info.get('length'), 1000),
             'timestamp': int_or_none(video_info.get('creationDate'), 1000),
         }
@@ -339,7 +340,7 @@ class BrightcoveLegacyIE(InfoExtractor):
                         ext = 'flv'
                 if ext is None:
                     ext = determine_ext(url)
-                tbr = int_or_none(rend.get('encodingRate'), 1000),
+                tbr = int_or_none(rend.get('encodingRate'), 1000)
                 a_format = {
                     'format_id': 'http%s' % ('-%s' % tbr if tbr else ''),
                     'url': url,