我一直试图使用给定代码从此URL下载文件,但出现以下错误: HTTPError:HTTP错误403:禁止。 此外,如何通过将url从*/2020/SCBSEALL0207.zip更改为*/2020/SCBSEALL0101.zip来下载多个文件
import requests
url = 'https://www.bseindia.com/BSEDATA/gross/2020/SCBSEALL0207.zip'
r = requests.get(url)
with open("Bse_20200702", "wb") as code:
code.write(r.content)
urllib.request.urlretrieve(url, "Bse_20200702.zip")```
目前没有回答
相关问题 更多 >
编程相关推荐