From d09eed7674b5df2a1883a7c7abad40fdfd062c74 Mon Sep 17 00:00:00 2001 From: Mikhail Korobov Date: Wed, 8 Feb 2017 23:44:55 +0500 Subject: [PATCH] use w3lib.html.strip_html5_whitespace function; expand docs; strip consistently before calling process_value --- docs/topics/link-extractors.rst | 9 +++++---- scrapy/linkextractors/htmlparser.py | 6 +++--- scrapy/linkextractors/lxmlhtml.py | 6 +++--- scrapy/linkextractors/sgml.py | 7 ++++--- scrapy/utils/url.py | 13 ------------- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/docs/topics/link-extractors.rst b/docs/topics/link-extractors.rst index 2486e0982..75bdb4142 100644 --- a/docs/topics/link-extractors.rst +++ b/docs/topics/link-extractors.rst @@ -134,10 +134,11 @@ LxmlLinkExtractor :param strip: whether to strip whitespaces from extracted attributes. According to HTML5 standard, leading and trailing whitespaces - must be stripped from ``href`` attributes of ```` and ```` - elements, so LinkExtractor strips them by default. Set ``strip=False`` - to turn it off (e.g. if you're extracting urls from elements or - attributes which allow leading/trailing whitespaces). + must be stripped from ``href`` attributes of ````, ```` + and many other elements, ``src`` attribute of ````, ``