Code
@app.route('/') def parse(ip): theurl = 'http://%s/requests/status.xml' % ip username = '' password = '' passman = urllib2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, theurl, username, password) authhandler = urllib2.HTTPBasicAuthHandler(passman) opener = urllib2.build_opener(authhandler) urllib2.install_opener(opener) pagehandle = urllib2.urlopen(theurl) doc = minidom.parse(pagehandle) full = doc.getElementsByTagName("fullscreen") vol = doc.getElementsByTagName("volume") fullscreen = full[0].childNodes[0].nodeValue volume = vol[0].childNodes[0].nodeValue return "fullscreen: %s Volume: %s" % (fullscreen,volume) def index(): parse(ip='значение') When executing gives an error
TypeError: parse() takes exactly 1 argument (0 given) Tell me what could be the problem, the value seems to be passed
@app.route('/')probably read about them - OlegUP