- 帖子
- 1
- 精华
- 0
- 积分
- 5
- 阅读权限
- 10
- 注册时间
- 2017-11-25
- 最后登录
- 2017-11-25
|
import requests
url = 'https://read.qidian.com/chapter/VaC5szd_VsQ1/rOwWG6FTeU01'
response = requests.get(url)
print(response.text)
运行结果出错
E:\工作软件\python\python.exe "C:/Users/dell/Desktop/MY procedure/Python/spider.py"
Traceback (most recent call last):
File "C:/Users/dell/Desktop/MY procedure/Python/spider.py", line 6, in <module>
response = requests.get(url)
File "E:\工作软件\python\lib\site-packages\requests\api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "E:\工作软件\python\lib\site-packages\requests\api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "E:\工作软件\python\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "E:\工作软件\python\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "E:\工作软件\python\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
TypeError: urlopen() missing 1 required positional argument: 'request_method'
Process finished with exit code 1
|
|