环境:windows7 ,Python 3.6.7 ,you-get 0.4.1432 ,bat
变量说明:
for1 chapters 章节 62184 ~ 62210
for2 jpgNum jpg 1~40
for3 fileFolder 存放每个章节的文件夹 1~50
最初的示例图
测试代码
路径内容:
最终效果代码 test.bat:
@echo off
SETLOCAL
set /a chapters=62184
set /a jpgNum=1
set /a fileFolder=1
:start
md C:\Users\test\%fileFolder%
md C:\Users\test\%fileFolder%\%chapters%
you-get -o C:\Users\test\%fileFolder%\%chapters% https://xxxx/xxx/11827/%chapters%/%jpgNum%.jpg
set /a jpgNum+=1
if %jpgNum% leq 3 GOTO start
set /a jpgNum=1
set /a fileFolder+=1
set /a chapters+=1
if %fileFolder% leq 3 GOTO start
if %chapters% leq 62186 GOTO start
EXIT
pause