Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
looyolo
scrapy
提交
c6464cc4
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,发现更多精彩内容 >>
提交
c6464cc4
编写于
5月 09, 2017
作者:
P
Paul Tremberth
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add verbose introduction to new features
上级
e139d990
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
46 addition
and
0 deletion
+46
-0
docs/news.rst
docs/news.rst
+46
-0
未找到文件。
docs/news.rst
浏览文件 @
c6464cc4
...
...
@@ -6,6 +6,52 @@ Release notes
Scrapy 1.4.0 (2017-XX-XX)
-------------------------
Scrapy 1.4 does not bring that many breathtaking new features
but quite a few handy improvements nonetheless.
Scrapy now supports anonymous FTP sessions with customizable user and
password via the new :setting:`FTP_USER` and :setting:`FTP_PASSWORD` settings.
**And if you're using Twisted version 17.1.0 or above, FTP is now available
with Python 3.**
Link extractors now work similarly to what a regular modern browser would
do. Especially, leading and trailing whitespace are removed from attributes
(think ``href=" http://example.com"``) when building ``Link`` objects.
This whitespace-stripping also happens for ``action`` attributes with
``FormRequest``.
**Please also note that link extractors do not canonicalize URLs by default
anymore.** This was puzzling users every now and then, and it's not what
browsers do in fact, so we removed that extra transformation on extractred
links.
There's a new ``response.follow()`` shortcut for creating URLs directly
from the response instance in callbacks.
For example, instead of::
scrapy.Request(response.urljoin(somehrefvalue))
you can now use the simpler::
response.follow(somehrefvalue)
For those of you wanting more control on the ``Referer:`` header that Scrapy
sends when following links, you can set your own ``Referrer Policy``.
Prior to Scrapy 1.4, the default ``RefererMiddleware`` would simply and
blindly set it to the URL of the response that generated the HTTP request
(which could leak information on your URL seeds).
By default, Scrapy now behaves much like your regular browser does.
And this policy is fully customizable with W3C standard values
(or with something really custom of your own if you wish).
See :setting:`REFERRER_POLICY` for details.
Last but not least, Scrapy now has the option to make JSON and XML items
more human-readable, with newlines between items and even custom indenting
offset, using the new :setting:`FEED_EXPORT_INDENT` setting.
Enjoy! (Or read on for the rest of changes in this release.)
New Features
~~~~~~~~~~~~
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录