I have this code to access the router's config.
class Peplink_login(threading.Thread):
twill_browser = twill.browser.TwillBrowser()
def login_sso(self):
login_url = "http://" + ROUTER_IP + "cgi-bin/MANGA/index.cgi"
st = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print st+"url ---- %s" % login_url
self.twill_browser.go(login_url)
self.formvalue(self.twill_browser, "1", "username", "admin")
self.formvalue(self.twill_browser, "2", "password", "admin")
self.twill_browser.submit()
sleep
self.twill_browser.code(200)
print "Login successful"
I am new to python and I need this to be sorted out. The error says "no matching forms" but I only have 2 input boxes on the main page. Why is that?