试图让登录脚本正常工作,我一直返回相同的登录页面,所以我打开了http流的调试(由于https,不能使用wireshark等)。我什么都没有,所以我复制了这个例子,它有效。对google.com的任何查询都有效,但对我的目标页面不显示调试,有什么区别?如果它是重定向,我希望看到第一个get/redirectheader和http://google也重定向。importurllibimporturllib2importpdbh=urllib2.HTTPHandler(debuglevel=1)opener=urllib2.build_opener(h)urllib2.install_op