问题描述
我正在对pdf文档的URL进行GET请求。尝试了不同的组合,每次都获得r.status_code = 200
但r.content = ''
。
但是我尝试在不使用标准身份验证的情况下进行如下操作,都获得状态200和空内容。还尝试根据https://stackoverflow.com/a/25492290/8165689更改'user-agent'参数,仍然没有运气。谢谢您的建议吗?
r = requests.get('http://galeriepoggi.com/cspdocs/invoice/reports/facture.PHP?id=1079',allow_redirects=True,auth=(user,passw),headers={'User-Agent': 'test'})
或
r = requests.get('http://galeriepoggi.com/cspdocs/invoice/reports/facture.PHP?id=1079',allow_redirects=True)
给出r.status_code = 200 / r.content =''
我正在Python 2中使用请求版本2.23.0
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)