I tried to create a small autoposter script. I need to find and print all input from a webpage. I'm trying to use the mechanize
library.
I wrote this script:
import urllib
import cookielib
import mechanize
url = "https://www.sito.com/page.html"
cookie = cookielib.CookieJar()
browser = mechanize.Browser()
browser.set_cookiejar(cookie)
browser.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
browser.open(url)
for f in browser.forms():
print f.name
How can I print all input from web page with mechanize
or possibly another library?