有一个文件文件放网页地址
https://cnkgraph.com/Category/%E ... lumnId=KR7a0001_008
https://cnkgraph.com/Category/%E ... lumnId=KR7a0001_009
https://cnkgraph.com/Category/%E ... lumnId=KR7a0001_018
https://cnkgraph.com/Category/%E ... lumnId=KR7a0001_019
https://cnkgraph.com/Category/%E ... lumnId=KR7a0001_031
https://cnkgraph.com/Category/%E ... lumnId=KR7a0001_032
https://cnkgraph.com/Category/%E ... lumnId=KR7a0001_043
用这个可以批量下载- @echo off
- REM 设置curl.exe路径
- set curl="C:\CURL\bin\curl.exe"
- REM 设置下载html的保存目录路径
- set dstdir="E:\37\"
- REM 设置urls文件路径
- set urlfile="%~dp0TEXT103.txt"
- set tmpfile="%temp%\~%random%"
- pushd %dstdir%
- >%tmpfile% (
- echo --remote-name-all
- echo --location
- echo --compressed
- echo --user-agent "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092416 Firefox/3.0.3"
- for /f "usebackq delims=" %%A in (%urlfile%) do (
- echo --url %%A
- )
-
- )
-
- %curl% --config %tmpfile%
-
- pause
- del %tmpfile%
- popd
- pause
- exit /b
复制代码 但是只看到一个文件,如何处理?最好能以网址最后九个字符如a0001_043作为文件名,下载一个网页延时2滗,要如何改进一下?
先谢了! |