发布凭据后,使用python请求保留身份验证。
import requests
s = requests.session()
posturl= 'https://item-api-prod.liveauctioneers.com/auth/spalogin?c=20170802'
form = {'password': 'password', 'username': 'username'}
p=s.post(url=posturl, data = form)
到目前为止,验证成功,但是当尝试使用同一会话时,请求将挂起:
geturl = 'https://www.liveauctioneers.com/item/40018826_1930s-1950s-italian-german-hp-porcelain-children-items'
g=s.get(geturl)
...挂... 但是,如果我不在会话中,则返回成功但未通过身份验证:
g2=requests.get(geturl)