-1

I am getting error while executing below line:

print urllib.urlopen('http://'+dns+'/password?passwd='+PASSWORD).read

Error:

IOError: ('http protocol error', 0, 'got a bad status line', None)

However, it's working fine with webbrowser.open_new

Aquarius24
  • 1,806
  • 6
  • 33
  • 61

1 Answers1

0

.read just references the method name. Try calling it, by adding paranthesis:

.read()
Corey Goldberg
  • 59,062
  • 28
  • 129
  • 143