W3lib

Latest version: v2.2.1

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 6

1.17.0

-------------------

- Add Python 3.5 and 3.6 support
- Add ``w3lib.url.parse_data_uri`` helper for parsing "data:" URIs
- Add ``w3lib.html.strip_html5_whitespace`` function to strip leading and
trailing whitespace as per W3C recommendations, e.g. for cleaning
"href" attribute values
- Fix ``w3lib.http.headers_raw_to_dict`` for multiple headers with same name
- Do not distribute tests/test_*.pyc artifacts

1.16.0

-------------------

- ``canonicalize_url()`` and ``safe_url_string()``:
strip ":" when no port is specified (as per `RFC 3986`_;
see also https://github.com/scrapy/scrapy/issues/2377)
- ``url_query_cleaner()``: support new ``keep_fragments`` argument
(defaulting to ``False``)

1.15.0

-------------------

- Add ``canonicalize_url()`` to ``w3lib.url``

1.14.3

-------------------

Bugfix release:

- Handle IDNA encoding failures in ``safe_url_string()`` (issue 62)

1.14.2

-------------------

Bugfix release:

- fix function import for (deprecated) ``urljoin_rfc`` (issue 51)
- only expose wanted functions from ``w3lib.url``, via ``__all__``
(see issue 54, https://github.com/scrapy/scrapy/issues/1917)

1.14.1

-------------------

Bugfix release:

- For bytes URLs, when supplied encoding (or default UTF8) is wrong,
``safe_url_string`` falls back to percent-encoding offending bytes.

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.