From 69fa8d3f05ed4b4181eeacdd2d2739d264062670 Mon Sep 17 00:00:00 2001 From: wenead99 <42309414+wenead99@users.noreply.github.com> Date: Thu, 30 May 2019 19:12:58 +0800 Subject: [PATCH] =?UTF-8?q?Beta=200.4=20=E6=9B=B4=E6=96=B0=20*=E6=96=B0?= =?UTF-8?q?=E5=A2=9E:=E6=9B=BF=E6=8D=A2'=5F'=E4=B8=BA'-'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AV_Data_Capture.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/AV_Data_Capture.py b/AV_Data_Capture.py index 5ca95d8..ce5b2f9 100644 --- a/AV_Data_Capture.py +++ b/AV_Data_Capture.py @@ -21,7 +21,8 @@ def movie_lists(): total = a2+b2+c2+d2+e2+f2+g2 return total -def lists_from_test(custom_nuber): +def lists_from_test(custom_nuber): #电影列表 + a=[] a.append(custom_nuber) return a @@ -35,10 +36,23 @@ def CEF(path): except: a='' +def rreplace(self, old, new, *max): +#从右开始替换文件名中内容,源字符串,将被替换的子字符串, 新字符串,用于替换old子字符串,可选字符串, 替换不超过 max 次 + count = len(self) + if max and str(max[0]).isdigit(): + count = max[0] + return new.join(self.rsplit(old, count)) + if __name__ =='__main__': os.chdir(os.getcwd()) - for i in movie_lists(): - os.system('python core.py' + ' "' + i + '"') + for i in movie_lists(): #遍历电影列表 交给core处理 + if '_' in i: + os.rename(i, rreplace(i,'_','-',1)) + i = rreplace(i,'_','-',1) + os.system('python core.py' + ' "' + i + '"') #选择从py文件启动 (用于源码py) + #os.system('core.exe' + ' "' + i + '"') #选择从exe文件启动(用于EXE版程序) + print("[*]=====================================") + print("[!]Cleaning empty folders") CEF('JAV_output') print("[+]All finished!!!")