w3lib 2.6.0


pip install w3lib

  Latest version

Released: Nov 05, 2026


Meta
Author: Scrapy project
Requires Python: >=3.11

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Python :: 3.15
  • Python :: Implementation :: CPython

Topic
  • Internet :: WWW/HTTP
  • Software Development :: Libraries :: Python Modules
https://github.com/scrapy/w3lib/actions/workflows/test.yml/badge.svg Coverage report

Overview

This is a Python library of web-related functions, such as:

  • remove comments, or tags from HTML snippets

  • extract base url from HTML snippets

  • translate entities on HTML strings

  • convert raw HTTP headers to dicts and vice-versa

  • construct HTTP auth header

  • converting HTML pages to unicode

  • sanitize urls (like browsers do)

  • extract arguments from urls

Requirements

Python 3.11+

Install

pip install w3lib

Documentation

See https://w3lib.readthedocs.io/

License

The w3lib library is licensed under the BSD license.

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
frostwork (>=0.2.2)