I'm trying to make a script to auto-login to this website and I'm having some troubles. I was hoping I could get assistance with making this work. I have the below code assembled but I get 'Your request cannot be processed at this time\n' in the bottom of what's returned to me when I should be getting some different HTML if it was successful:
from pyquery import PyQuery
import requests
url = 'https://licensing.gov.nl.ca/miriad/sfjsp?interviewID=MRlogin'
values = {'d_1553779889165': '[email protected]',
'd_1553779889166': 'thisIsMyPassw0rd$$$',
'd_1618409713756': 'true',
'd_1642075435596': 'Sign in'
}
r = requests.post(url, data=values)
print (r.content)
DevTools
in Chrome/Firefox to see what browser sends to server.files=
.r.request.body.decode()
to see what you send to server. And you can compare it with values inDevTools
HTML
connections) - first on list should be connection with methodPOST
and it should sends your data. If you click on its URL then it should show details: headers, cookies, response, request, etc. Andrequest
should show what it sends to server. Normal form send string likename=value&other_name=other_value
but this request send strings with----
andContent-Disposition: form-data; name=
and this means multi-form data.