I am an nb in this domain so I apologize for the lack of details. I am trying to log in to finviz with "user" "pass" as my username and password, I have the subscription with finviz so user/pass works when I use browser. However, when trying to login with python requests as below it doesn't seem to be doing the job right. the first question is how can I find the exact attributes submitted through the asp form? It always gives me 200 responses even username and pass are wrong.
import os, requests
s = requests.session()
loginurl = "https://finviz.com/login.ashx"
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36'}
login_data = {'ctl00$ContentPlaceHolderNavPane$LeftSection$UserLogin$email':'user',
'ctl00$ContentPlaceHolderNavPane$LeftSection$UserLogin$password': 'pass',
"ctl00$ContentPlaceHolderNavPane$LeftSection$UserLogin$LoginButton":"Log In",
}
response = s.post(loginurl, data=login_data , headers = headers)
print(response)
response.headers