本帖最后由 佐木 于 2021-2-5 08:35 编辑
[Python] 纯文本查看 复制代码 #coding=utf-8
import requests
from urllib import parse
from requests.auth import HTTPBasicAuth
url='https://www.steampy.com/xboot/steamUser/getSalesByAmount?pageNumber=1&pageSize=20&sort=discount&order=asc&startDate=&endDate=&txAmount=61'
a = '佐木'
a=a.encode("utf-8").decode("latin1")
r=requests.get(url, auth=(a, '12345678'))
#r=requests.get(url, auth=HTTPBasicAuth('%E4%BD%90%E6%9C%A', '12345678'))
print(r.text)
需要访问的地址如上,但是不加用户名和密码的话会提示401,加上还是提示401,正常访问这个网页,在已经登陆账号的情况下访问还是会提示401,小白实在不知道该怎么解决这个问题了,求大神们给个解答啊 |