From cecb76efecd553a85c312fe14ab4c2afbc380daa Mon Sep 17 00:00:00 2001 From: laxa Date: Mon, 30 Jul 2018 20:37:12 +0200 Subject: [PATCH] fix when checking video from live steam --- pafy/backend_youtube_dl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pafy/backend_youtube_dl.py b/pafy/backend_youtube_dl.py index 4b38f12d..0e9b0c93 100644 --- a/pafy/backend_youtube_dl.py +++ b/pafy/backend_youtube_dl.py @@ -46,6 +46,10 @@ def _fetch_basic(self): self.callback("Fetched video info") self._title = self._ydl_info['title'] + + if self._ydl_info.get('entries'): + self._ydl_info = self._ydl_info['entries'][0] + self._author = self._ydl_info['uploader'] self._rating = self._ydl_info['average_rating'] self._length = self._ydl_info['duration']