0

I'm trying to log in this website using my credentials running python script but the problem is that the xhr requests visible as login in chrome dev tools stays for a moment and then vanishes, so I can't see the appropriate parameters (supposed to be recorded) necessary to log in. However, I do find that login in xhr if I put my password wrong. The form then looks incomplete, though.

I've tried so far (an incomplete payload because of chrome dev tools):

import requests

url = "https://member.angieslist.com/gateway/platform/v1/session/login"

payload = {"identifier":"username","token":"sometoken"}

res = requests.post(url,json=payload,headers={
    "User-Agent":"Mozilla/5.0",
    "Referer":"https://member.angieslist.com/member/login"
    })
print(res.url)

How can I log in that site filling in appropriate parameters issuing a post http requests?

robots.txt
  • 96
  • 2
  • 10
  • 36
  • https://stackoverflow.com/questions/15603561/how-can-i-debug-a-http-post-in-chrome Tried this? – clubby789 Aug 05 '19 at 13:45
  • This specific case is unusual and the records are not visible in xhr requests within network tab in chrome dev tools @Jammy Dodger . – robots.txt Aug 05 '19 at 13:47

1 Answers1

1

There is a checkbox called Persist logs in the Network tab and if its switched on the data about the post request remains. I think you should requests a session if you need to keep the script logged in. It may be done with:

import requests
url = 'https://member.angieslist.com/gateway/platform/v1/session/login'
s = requests.session()
payload = {"identifier":"youremail","token":"your password"}
res = s.post(url,json=payload,headers={"User-Agent":"Mozilla/5.0",'Referer': 'https://member.angieslist.com/member/login?redirect=%2Fapp%2Faccount'}).text
print(res)

the post requests returns a json file with all details of user.

akin_ai
  • 66
  • 5