File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1818from aligo import Aligo , BaseFile
1919
2020# 本地目录,用于存放下载的文件夹
21- download_dir = Path .home () / 'Downloads/AliyunDrive/'
22- download_path = Path (download_dir )
21+ download_path = Path .home () / 'Downloads/AliyunDrive/'
2322
2423# IDM 主程序路径
25- # 注意加双引号的方式
26- idm = 'C:"/MyProgram/IDM/IDMan.exe"'
24+ idm = 'C:\\ MyProgram\\ IDM\\ IDMan.exe'
2725
2826
2927def del_special_symbol (s : str ) -> str :
3028 """删除Windows文件名中不允许的字符"""
31- return re .sub (r'[\\/ :*?"<>|]' , '_' , s )
29+ return re .sub (r'[:*?"<>|]' , '_' , s )
3230
3331
3432def callback (file_path : str , file : BaseFile ):
@@ -52,7 +50,7 @@ def main():
5250
5351 # 必须是一个文件夹
5452 drive_id = ali .v2_user_get ().resource_drive_id
55- parent_file_id = '64f95b3ca82330174171481a9c401612ff63f0cc '
53+ parent_file_id = '64dcd9b5356a247012a44206a6dca0b5ab304c8e '
5654
5755 # 创建 parent_file_id 文件夹
5856 folder = ali .get_file (file_id = parent_file_id , drive_id = drive_id )
You can’t perform that action at this time.
0 commit comments