【问题标题】:Error while executing url lib in python在python中执行url lib时出错
【发布时间】:2015-09-27 19:02:49
【问题描述】:

执行以下行时出现错误:

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

错误:

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

但是,webbrowser.open_new 可以正常工作

【问题讨论】:

标签: python urllib


【解决方案1】:

.read 只是引用方法名。尝试通过添加括号来调用它:

.read()

【讨论】:

    猜你喜欢
    • 2016-08-05
    • 2020-04-13
    • 1970-01-01
    • 2011-04-30
    • 2011-04-20
    • 2021-03-25
    • 2020-03-06
    • 1970-01-01
    • 2018-10-24
    相关资源
    最近更新 更多