Setting cookies when using the shell

890 views
Skip to first unread message

chaitanyasai

unread,
Feb 1, 2010, 3:12:44 PM2/1/10
to scrapy-users
Hi,

Is there an easy way to store cookies when using the shell. The fetch
() function does not seem to pass on cookies from responses.
I am doing this 'manually' now; I extract the cookie from
response.request.headers, create a new Request object and then pass it
on to fetch(). Is there a simpler way to do this?

Thanks!


P.S: Scrapy is wonderful. Thanks for all the great work you have put
into it!

Pablo Hoffman

unread,
Feb 6, 2010, 6:49:08 PM2/6/10
to scrapy...@googlegroups.com
On Mon, Feb 01, 2010 at 12:12:44PM -0800, chaitanyasai wrote:
> Is there an easy way to store cookies when using the shell. The fetch
> () function does not seem to pass on cookies from responses.
> I am doing this 'manually' now; I extract the cookie from
> response.request.headers, create a new Request object and then pass it
> on to fetch(). Is there a simpler way to do this?

No, there isn't. But I reckon it would be a very nice feature. If you (or
anyone else) care to send me a patch for this functionality, I would be more
than gald to merge it.

> P.S: Scrapy is wonderful. Thanks for all the great work you have put
> into it!

Thanks for this - it's what makes it worth it :)

Pablo.

Reply all
Reply to author
Forward
0 new messages