Hey there! Scrapy cookies are stored in memory by default, so they disappear after the spider stops. If you wanna save them, you can use the `cookies` parameter in your requests or write them to a file.
I’d recommend using the `json` module to save them as a file. Here’s a quick snippet:
```python
import json
cookies = response.request.headers.get('Cookie')
with open('cookies.json', 'w') as f:
json.dump(cookies, f)
```
This way, you can load them back later. Hope this clears things up!
I’d recommend using the `json` module to save them as a file. Here’s a quick snippet:
```python
import json
cookies = response.request.headers.get('Cookie')
with open('cookies.json', 'w') as f:
json.dump(cookies, f)
```
This way, you can load them back later. Hope this clears things up!
