浏览代码

[livestream:event] Ensure video id is string (Closes #9721)

Sergey M․ 9 年之前
父节点
当前提交
a26a9d6239
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      youtube_dl/extractor/livestream.py

+ 3 - 2
youtube_dl/extractor/livestream.py

@@ -203,9 +203,10 @@ class LivestreamIE(InfoExtractor):
             if not videos_info:
             if not videos_info:
                 break
                 break
             for v in videos_info:
             for v in videos_info:
+                v_id = compat_str(v['id'])
                 entries.append(self.url_result(
                 entries.append(self.url_result(
-                    'http://livestream.com/accounts/%s/events/%s/videos/%s' % (account_id, event_id, v['id']),
-                    'Livestream', v['id'], v['caption']))
+                    'http://livestream.com/accounts/%s/events/%s/videos/%s' % (account_id, event_id, v_id),
+                    'Livestream', v_id, v.get('caption')))
             last_video = videos_info[-1]['id']
             last_video = videos_info[-1]['id']
         return self.playlist_result(entries, event_id, event_data['full_name'])
         return self.playlist_result(entries, event_id, event_data['full_name'])