I am trying to fill out a web form using a python program by submitting specific values. the problem is that it uses javascript. I will send an example of the value I want to fill.
fo.addVariable("email"," email@yahoo.com ") fo.addVariable("age","19") fo.addVariable("gender","M") fo.addVariable("line","hello")
which is an example of the value on the page. what I want to do is to specify a value and change it. what I'm trying now is this:
data = urllib.parse.urlencode({"line": "hello", "age": "50", "email": " email@yahoo.com ", "gender": "M"}).encode() resp = urlreq.urlopen("http://url.com/update", data)
this usually works for most web forms. but for this he will not.
source share