scrapy札记


scrapy tutorial

##1.带参数的parse解析函数

Another common pattern is to build an item with data from more than one page, using a trick to pass additional data to the callbacks.

##2.response object

Parameters:

url (string) – the URL of this response
headers (dict) – the headers of this response. The dict values can be strings (for single valued headers) or lists (for multi-valued headers).
status (integer) – the HTTP status of the response. Defaults to 200.
body (str) – the response body. It must be str, not unicode, unless you’re using a encoding-aware Response subclass, such as TextResponse.
meta (dict) – the initial values for the Response.meta attribute. If given, the dict will be shallow copied.flags (list) – is a list containing the initial values for the Response.flags attribute. If given, the list will be shallow copied.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,941评论 0 23
  • 晚上七点半,她从手机里抬头,晚知晚觉夜晚降临。家里没有一丝灯光,只有窗外透进亮光。对面大楼一个个窗户亮起或黄或白的...
    月下梨花阅读 348评论 0 0
  • 放假之前,苏小金和邝鉴清两个人就私下商量了一下,要是让他们在这一个多月的时间里不见面那是要死人的。由于苏小金的妈妈...
    邝鉴萍阅读 296评论 0 5
  • It is our human common that we judge others by the first ...
    口一阅读 293评论 0 0
  • 梦里梦到醒不来的梦,醒来,汗湿了枕头。 只上了半天班已经累得不行,现在一天要用两天完成,不得不服老,又有一...
    玖__阅读 304评论 1 1