Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
looyolo
scrapy
提交
c6d20bdd
S
scrapy
项目概览
looyolo
/
scrapy
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
scrapy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c6d20bdd
编写于
3月 27, 2018
作者:
S
Steven Almeroth
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Doc: update wording for COOKIES_ENABLED
上级
6c3970e6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
12 deletion
+12
-12
docs/topics/downloader-middleware.rst
docs/topics/downloader-middleware.rst
+9
-11
docs/topics/request-response.rst
docs/topics/request-response.rst
+3
-1
未找到文件。
docs/topics/downloader-middleware.rst
浏览文件 @
c6d20bdd
...
@@ -158,13 +158,13 @@ more of the following methods:
...
@@ -158,13 +158,13 @@ more of the following methods:
:type spider: :class:`~scrapy.spiders.Spider` object
:type spider: :class:`~scrapy.spiders.Spider` object
.. method:: from_crawler(cls, crawler)
.. method:: from_crawler(cls, crawler)
If present, this classmethod is called to create a middleware instance
If present, this classmethod is called to create a middleware instance
from a :class:`~scrapy.crawler.Crawler`. It must return a new instance
from a :class:`~scrapy.crawler.Crawler`. It must return a new instance
of the middleware. Crawler object provides access to all Scrapy core
of the middleware. Crawler object provides access to all Scrapy core
components like settings and signals; it is a way for middleware to
components like settings and signals; it is a way for middleware to
access them and hook its functionality into Scrapy.
access them and hook its functionality into Scrapy.
:param crawler: crawler that uses this middleware
:param crawler: crawler that uses this middleware
:type crawler: :class:`~scrapy.crawler.Crawler` object
:type crawler: :class:`~scrapy.crawler.Crawler` object
...
@@ -237,16 +237,14 @@ Default: ``True``
...
@@ -237,16 +237,14 @@ Default: ``True``
Whether to enable the cookies middleware. If disabled, no cookies will be sent
Whether to enable the cookies middleware. If disabled, no cookies will be sent
to web servers.
to web servers.
Notice that if the :class:`~scrapy.http.Request`
Notice that despite the value of :setting:`COOKIES_ENABLED` setting if
has ``meta['dont_merge_cookies']`` evaluated to ``True``.
``Request.``:reqmeta:`meta['dont_merge_cookies'] <dont_merge_cookies>`
despite the value of :setting:`COOKIES_ENABLED` the cookies will **not** be
evaluates to ``True`` the request cookies will **not** be sent to the
sent to web servers and received cookies in
web server and received cookies in :class:`~scrapy.http.Response` will
:class:`~scrapy.http.Response` will **not** be merged with the existing
**not** be merged with the existing cookies.
cookies.
For more detailed information see the ``cookies`` parameter in
:class:`~scrapy.http.Request`
For more detailed information see the ``cookies`` parameter in
:class:`~scrapy.http.Request`.
.. setting:: COOKIES_DEBUG
.. setting:: COOKIES_DEBUG
...
...
docs/topics/request-response.rst
浏览文件 @
c6d20bdd
...
@@ -80,6 +80,8 @@ Request objects
...
@@ -80,6 +80,8 @@ Request objects
attributes of the cookie. This is only useful if the cookies are saved
attributes of the cookie. This is only useful if the cookies are saved
for later requests.
for later requests.
.. reqmeta:: dont_merge_cookies
When some site returns cookies (in a response) those are stored in the
When some site returns cookies (in a response) those are stored in the
cookies for that domain and will be sent again in future requests. That's
cookies for that domain and will be sent again in future requests. That's
the typical behaviour of any regular web browser. However, if, for some
the typical behaviour of any regular web browser. However, if, for some
...
@@ -294,7 +296,7 @@ Those are:
...
@@ -294,7 +296,7 @@ Those are:
* :reqmeta:`dont_retry`
* :reqmeta:`dont_retry`
* :reqmeta:`handle_httpstatus_list`
* :reqmeta:`handle_httpstatus_list`
* :reqmeta:`handle_httpstatus_all`
* :reqmeta:`handle_httpstatus_all`
*
``dont_merge_cookies`` (see ``cookies`` parameter of :class:`Request` constructor)
*
:reqmeta:`dont_merge_cookies`
* :reqmeta:`cookiejar`
* :reqmeta:`cookiejar`
* :reqmeta:`dont_cache`
* :reqmeta:`dont_cache`
* :reqmeta:`redirect_urls`
* :reqmeta:`redirect_urls`
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录