Skip to content

Commit 618a9cd

Browse files
committed
update example-22 应对限速问题.py
1 parent a5a44fe commit 618a9cd

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

examples/example-22 应对限速问题.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@
1818
from 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

2927
def del_special_symbol(s: str) -> str:
3028
"""删除Windows文件名中不允许的字符"""
31-
return re.sub(r'[\\/:*?"<>|]', '_', s)
29+
return re.sub(r'[:*?"<>|]', '_', s)
3230

3331

3432
def 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)

0 commit comments

Comments
 (0)