第二三种方法结果报错无法运行是怎么回事
request.add.header("user-agent","Mozilla/5.0")
这个为什么报错?
而且结果是这样的:
Traceback (most recent call last):
File "C:/Python27/55", line 16, in <module>
Request.add.header("user-agent","Mozilla/5.0")
File "C:\Python27\lib\urllib2.py", line 225, in __getattr__
raise AttributeError, attr
AttributeError: add