I've looked all over the place for the solution I'm looking for but just can't find it. Basically, I'm developing a tool which takes a list of URLs from a text document, logs into them with your username/password, and returns which ones work.
I have the login figured out and all, but how do I actually return if the login works? Sites entered on the list won't necessarily use cookies and will be developed on various platforms.
Here's my login code:
r = requests.post(action, data=values, verify=False)
print(r.headers)
print(r.status_code)
print(r.content)
print(r.url)
sleep(1)
I'd like everything after that first line to be in an if statement if the login actually works, but I can't figure out how to actually determine that.
Thanks.