Hi all,

I tried to write my own downloader middleware and pass some parameter in 
process_response just like below.

class MyMiddleware(object):
    def process_response(self, request, response, spider):
        response.meta['test'] = 'hello' # Spider cannot get this
        return response

However, I cannot get response meta in my spider.
But it can work if I pass request.meta in process_request.

class MyMiddleware(object):
    def process_request(self, request, spider):
        request.meta['test'] = 'hello' # Spider can get this
        return None

I'd like to know why I cannot passed parameter in response like the first 
example.
Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to scrapy-users+unsubscr...@googlegroups.com.
To post to this group, send email to scrapy-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to