From 15b517e90512388f696e3c1ed804ce42a5221802 Mon Sep 17 00:00:00 2001 From: taizan-hokuto <55448286+taizan-hokuto@users.noreply.github.com> Date: Tue, 28 Jan 2020 21:13:58 +0900 Subject: [PATCH] Aggregate variable --- pytchat/tool/downloader.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pytchat/tool/downloader.py b/pytchat/tool/downloader.py index 1e01471..a6cfbf9 100644 --- a/pytchat/tool/downloader.py +++ b/pytchat/tool/downloader.py @@ -261,6 +261,7 @@ def check_duplicate(blocks): type_0 = parser.get_type(blocks[index]) type_1 = parser.get_type(blocks[index+1]) return (type_0 == type_1) + ret =[] for i in range(len(blocks)-1): if ( is_same_offset(i) and is_same_id(i) and is_same_type(i) ): @@ -273,10 +274,7 @@ def download(video_id, div = 20, callback=None, processor = None): duration = videoinfo(video_id).get("duration") except InvalidVideoIdException: raise - if duration == 0: print("video is live.") return - - dlr = Downloader(video_id,duration,div,callback) - return dlr.download() \ No newline at end of file + return Downloader(video_id, duration, div, callback).download() \ No newline at end of file