mirror of
https://github.com/imgyh/tiktok.git
synced 2025-04-29 10:18:05 +08:00
parent
e194a2818b
commit
4c1a4ed950
@ -542,7 +542,7 @@ class TikTok(object):
|
|||||||
|
|
||||||
try:
|
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)
|
aweme_path = os.path.join(savePath, file_name)
|
||||||
if not os.path.exists(aweme_path):
|
if not os.path.exists(aweme_path):
|
||||||
os.mkdir(aweme_path)
|
os.mkdir(aweme_path)
|
||||||
|
@ -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)
|
result = re.findall(match, filenamestr)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user