1、首先得用网页打开你自己的百度云
2、点开你所要下载文件的下载链接,如下图
3、复制下载网址和文件名,自定义你想下载到的目录,填写到程序中
4、运行下列python程序
import requests
import threading
from time import time
import json
import re
def downloadFile(URL, spos, epos, fp):
try:
header = {}
header["Range"] = "bytes={}-{}".format(spos, epos)
result = requests.get(URL, headers=header)
fp.seek(spos)
fp.write(result.content)
except Exception:
print(Exception)
def split_file(file_size):
start_p = []
end_p = []
per_size = int(file_size / thread_num)
int_size = per_size * thread_num # 整除部分
for i in r