1、requests.get(url, params=None, headers=None, cookies=None, auth=None, timeout=None)
Sends a GET request. Returns Response object.
Parameters:
- url – URL for the new Request object.
- params – (optional) Dictionary of GET Parameters to send with the Request.
- headers – (optional) Dictionary of HTTP Headers to send with the Request.
- cookies – (optional) CookieJar object to send with the Request.
- auth – (optional) AuthObject to enable Basic HTTP Auth.
- timeout – (optional) Float describing the timeout of the request.
requests.get(url,params = None,headers = None,cookies = None,auth = None,timeout =无)
发送GET请求。 返回Response对象。
参数:
- url - 新的Request对象的URL。
- params - (可选)使用请求发送的GET参数字典。
- 头文件 - (可选)使用请求发送的HTTP头文件字典。
- Cookie - (可选)使用请求发送的CookieJar对象。
- auth - (可选)AuthObject启用基本HTTP身份验证。
- 超时 - (可选)描述请求超时的浮点数。