Scrapy 框架几种request请求返回类型

requests

scrapy.Request 返回类型

Scrapy 框架几种request请求返回类型

 

r = Request(url,callback = self.parse)

r: <GET http://www.tjconstruct.cn/Zbgs/Index/1?type%20=%20sgzb>

type(r) : scrapy.http.request.Request

 

response

Out[5]: <200 http://www.tjconstruct.cn/Zbgs/Index/1?type%20=%20sgzb>

type(response)

Out[6]: scrapy.http.response.html.HtmlResponse

正则匹配中text用法

程序过程的bug记录

5、

获取网页html源码

r = request.get(url)

return r.text

r为: <Response [200]>,

type(r)为: <class 'requests.models.Response'>

Scrapy 框架几种request请求返回类型

Scrapy 框架几种request请求返回类型

 

变量类型

Scrapy 框架几种request请求返回类型