代码出错了
为什么第二种方法我的出错了, Traceback (most recent call last): File "D:\Python学习资料\关于爬虫的代码学习\urlib_two.py", line 5, in
request.add_data('a','1') TypeError: add_data() takes exactly 2 arguments (3 given)为什么第二种方法我的出错了, Traceback (most recent call last): File "D:\Python学习资料\关于爬虫的代码学习\urlib_two.py", line 5, in
request.add_data('a','1') TypeError: add_data() takes exactly 2 arguments (3 given)2017-01-09
同问、
>>> b.add_data('name','%25')
Traceback (most recent call last):
File "<pyshell#31>", line 1, in <module>
b.add_data('name','%25')
TypeError: add_data() takes exactly 2 arguments (3 given)
>>> help(b.add_data)
Help on method add_data in module urllib2:
add_data(self, data) method of urllib2.Request instance
举报