简体   繁体   English

Scrapy响应中缺少cookie

[英]Missing cookies in Scrapy response

When calling the following URL in Chrome: 在Chrome中调用以下网址时:

http://www.ooshop.com/courses-en-ligne/ContentNavigation.aspx?TO_NOEUD_IDMO=N000000013348&TO_NOEUD_IDFO=81285&NOEUD_NIVEAU=3 http://www.ooshop.com/courses-zh-ligne/ContentNavigation.aspx?TO_NOEUD_IDMO=N000000013348&TO_NOEUD_IDFO=81285&NOEUD_NIVEAU=3

I got the following cookies: 我得到以下cookie:

LBcookie
OOshopSessionState
___utmvafIuiNzR
___utmvbfIuiNzR
___utmvmfIuiNzR
incap_ses_189_516467
visid_incap_516467

I am trying to retrieve them in Scrapy . 我试图在Scrapy检索它们。 But when running it through Scrapy shell, I have only 4 out of 7 in response.headers.getlist('Set-Cookie') . 但是当通过Scrapy shell运行它时,在response.headers.getlist('Set-Cookie') ,我只有7个中有4个。

Any idea? 任何想法?

  • edit your settings.py 编辑您的settings.py
  • add COOKIES_DEBUG = True 添加COOKIES_DEBUG = True

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM