From 9a74b2b6e5caa5887f120d29207dca55ab483656 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 18 Mar 2019 09:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=94=B9=E8=BF=9B=EF=BC=9A?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6=E5=A4=A7=E5=B0=8F=E4=B8=BA?= =?UTF-8?q?0=E6=97=B6=EF=BC=8C=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=B9=B6=E4=B8=8D=E4=B8=8A=E4=BC=A0=E8=AF=A5=E6=96=87=E4=BB=B6?= 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 b465d26..c40e6f6 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -11,7 +11,7 @@ q = queue.Queue() base_uri = "" isUpload = False uq = queue.Queue() -eq = queue.Queue() + class downloader(XiGuaLiveApi): files = [] @@ -89,6 +89,9 @@ def download(url): print("{} : Download Quiting With Exception {}".format(datetime.strftime(datetime.now(), "%y%m%d %H%M"),e.__str__())) f.close() isUpload = True + if os.path.getsize(path) == 0: + os.remove(path) + return False uq.put(path) download(url)