Python urllib,urllib2 fill form
I want to fill a HTML form with urllib2 and urllib . import urllib import urllib2 url = 'site.com/registration.php' values = {'password' : 'password', 'username': 'username' } data = urllib.urlencode(values) req = urllib2.Request(url, data) response = urllib2.urlopen(req) the_page = response.read() But on the end of the form is a button(input type='submit') . If you don't click the button you can't send the data what you wrote in the input(type text) How can I click the button with urllib and urllib2 ? This is really more of something you would do with Selenium or similar. selenium.webdriver