自动过滤隐藏文件
This commit is contained in:
parent
4fa7175832
commit
4d9a38ad68
@ -45,9 +45,9 @@ def main():
|
||||
# 固定的base_url值
|
||||
base_url = 'https://link.kite.kim/feng'
|
||||
|
||||
# 获取当前目录下的所有文件名,排除此脚本文件
|
||||
# 获取当前目录下的所有文件名,排除此脚本文件和隐藏文件
|
||||
current_script = os.path.basename(__file__)
|
||||
file_names = [f for f in os.listdir('.') if os.path.isfile(f) and f != current_script]
|
||||
file_names = [f for f in os.listdir('.') if os.path.isfile(f) and f != current_script and not f.startswith('.')]
|
||||
|
||||
# 生成URL链接
|
||||
urls = generate_urls(file_names, base_url, args.dir)
|
||||
|
Loading…
Reference in New Issue
Block a user