本帖最后由 923590810 于 2020-10-6 02:46 编辑
[Python] 纯文本查看 复制代码 import requests
header = {
"User-Agent":
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"}
for i in range(1,347):
num = "%03d" % i
url = "http://ysting.ysxs8.com:81/%E6%81%90%E6%80%96%E6%82%AC%E7%96%91/%E9%98%B4%E5%AE%85%E9%AC%BC%E5%A6%BB/"+num+".mp3"
data = requests.get(url = url, stream=True,headers = header)
with open("阴宅鬼妻"+num+'.mp3',"wb")as f:
print(data.url)
f.write(data.content)
print("阴宅鬼妻"+num+"下载完毕")
下载下来字节长度一样 也无法正常播放 但是源地址是OK的 可以正常使用 |