From 4c25ea3410082fdec859b4acc8d0b93fabfa2d62 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 21 Mar 2019 14:18:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E7=A8=8B=E6=96=AD=E5=BC=80=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E7=AB=8B=E5=8D=B3=E6=9B=B4=E6=96=B0=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liveDownloader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/liveDownloader.py b/liveDownloader.py index 3eb51de..c0e0349 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -160,11 +160,13 @@ if __name__ == "__main__": if d is None: d = datetime.strftime(datetime.now(), "%Y_%m_%d") if not t.is_alive(): + _count = 0 _preT = api.playlist t = threading.Thread(target=download, args=(_preT,)) t.setDaemon(True) t.start() if not ut.is_alive(): + _count = 0 ut = threading.Thread(target=upload, args=(d,)) ut.setDaemon(True) ut.start() @@ -172,7 +174,8 @@ if __name__ == "__main__": try: api.updRoomInfo() _count = 0 - except: + except Exception as e: + print(e.__str__()) time.sleep(10) _count += 1 continue