scrapy札记

2015-08-28  本文已影响0人  vin_yuan

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.
上一篇 下一篇

猜你喜欢

热点阅读