From b438312c9765890fa4532d54d385421b1a2839f1 Mon Sep 17 00:00:00 2001 From: mo_yy <54110819+moyy996@users.noreply.github.com> Date: Mon, 19 Aug 2019 12:23:45 +0800 Subject: [PATCH] Update core.py --- core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index a18de08..9d26f78 100755 --- a/core.py +++ b/core.py @@ -463,8 +463,12 @@ def renameBackdropToJpg_copy(): shutil.copy(path + '/Backdrop.jpg', path + '/' + number + '.jpg') print('[+]Image Downloaded!', path + '/' + number + '.jpg') def get_part(filepath): - if re.search('-CD\d+', filepath): - return re.findall('-CD\d+', filepath)[0] + try: + if re.search('-CD\d+', filepath): + return re.findall('-CD\d+', filepath)[0] + except: + print("[-]failed!Please rename the filename again!") + moveFailedFolder() if __name__ == '__main__': filepath=argparse_get_file()[0] #影片的路径