diff --git a/TikTok.py b/TikTok.py index 026716b..e9d72e0 100644 --- a/TikTok.py +++ b/TikTok.py @@ -542,7 +542,7 @@ class TikTok(object): try: # 使用作品 创建时间+描述 当文件夹 - file_name = self.utils.replaceStr(awemeDict["create_time"] + " " + awemeDict["desc"]) + file_name = awemeDict["create_time"] + " " + self.utils.replaceStr(awemeDict["desc"]) aweme_path = os.path.join(savePath, file_name) if not os.path.exists(aweme_path): os.mkdir(aweme_path) diff --git a/TikTokUtils.py b/TikTokUtils.py index 4cdfdec..6cd9bb4 100644 --- a/TikTokUtils.py +++ b/TikTokUtils.py @@ -42,7 +42,7 @@ class Utils(object): 替换非法字符,缩短字符长度,使其能成为文件名 """ # 匹配 汉字 字母 数字 空格 - match = "([0-9A-Za-z\u4e00-\u9fa5 -._]+)" + match = "([0-9A-Za-z\u4e00-\u9fa5 #_-]+)" result = re.findall(match, filenamestr)