mirror of
https://github.com/xhlove/GetDanMu.git
synced 2025-12-17 16:45:57 +08:00
增加搜狐视频弹幕下载并改进输入提示
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
'''
|
||||
# 作者: weimo
|
||||
# 创建日期: 2020-01-04 19:17:44
|
||||
# 上次编辑时间 : 2020-01-11 17:25:09
|
||||
# 上次编辑时间 : 2020-01-16 20:06:23
|
||||
# 一个人的命运啊,当然要靠自我奋斗,但是...
|
||||
'''
|
||||
import os
|
||||
@@ -31,12 +31,16 @@ def write_lines_to_file(ass_head, lines, file_path):
|
||||
for line in lines:
|
||||
f.write(line + "\n")
|
||||
|
||||
def check_file(name, skip=False, fpath=os.getcwd()):
|
||||
def check_file(name, args, fpath=os.getcwd()):
|
||||
flag = True
|
||||
file_path = os.path.join(fpath, name + ".ass")
|
||||
if os.path.isfile(file_path):
|
||||
if skip:
|
||||
if args.y:
|
||||
os.remove(file_path)
|
||||
elif args.series:
|
||||
# 存在重复的 那么直接pass(认为已经下载好了)
|
||||
flag = False
|
||||
return flag, file_path
|
||||
else:
|
||||
isremove = input("{}已存在,是否覆盖?(y/n):".format(file_path))
|
||||
if isremove.strip() == "y":
|
||||
|
||||
Reference in New Issue
Block a user