用bat转化for i in range(1,1700): result = sh.download(' https://doi.org/10.1002/wcms.{}'.format(str(i)), path='paper.pdf')
时间: 2023-04-04 19:02:55 浏览: 131
你可以使用以下的代码来实现这个转化:
@echo off
for /l %%i in (1,1,1700) do (
set url=https://doi.org/10.1002/wcms.%%i
set filename=paper_%%i.pdf
powershell -command "& { Invoke-WebRequest '%url%' -OutFile '%filename%' }"
)
这个代码会循环从1到1700,每次使用powershell下载对应的pdf文件,并保存到本地。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231045021.png)
![-](https://img-home.csdnimg.cn/images/20241231045021.png)
![-](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![bat](https://img-home.csdnimg.cn/images/20250102104920.png)