写入pdf文件
现在已经到了最后的部分
其中直接将上一部分请求的pdf内容保存到自己的文件路径中就可以了
if not os.path.exists(PDF_path):
with open(PDF_path,'wb') as f:
print('正在抓取:'+title)
f.write(response.content)
# time.sleep(1)
f.close()
else:
print('已下载: '+title)