|
|
|
@ -126,19 +126,6 @@ def download_image(image_url, file_path):
|
|
|
|
|
printf('图片下载失败,状态码:' + str(response.status_code))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 指定目录下有多少个指定前缀的文件
|
|
|
|
|
def getPrefixFileCount(directory_path, prefix):
|
|
|
|
|
# 使用os.listdir()获取目录下的所有文件和文件夹
|
|
|
|
|
entries = os.listdir(directory_path)
|
|
|
|
|
# 使用os.path.isfile()检查每个条目是否是文件
|
|
|
|
|
files = [entry for entry in entries if os.path.isfile(os.path.join(directory_path, entry))]
|
|
|
|
|
cnt = 0
|
|
|
|
|
for file in files:
|
|
|
|
|
if file.startswith(prefix):
|
|
|
|
|
cnt = cnt + 1
|
|
|
|
|
return cnt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getMyFilter(prompt_data):
|
|
|
|
|
myfilter = []
|
|
|
|
|
# 遍历prompt_data中的所有节点
|
|
|
|
|