lxml 5.2 split `lxml.html.clean` out into its own package called `lxml_html_clean`, so anything importing the old path breaks. Install it with `pip install lxml_html_clean` and the import works. If you control the code, you can also change `from lxml.html.clean import Cleaner` to `from lxml_html_clean import Cleaner`.

## The error

```text
ModuleNotFoundError: No module named 'lxml_html_clean'
```

## Fix it

1. **Install the split-out package**

```
python -m pip install lxml_html_clean
```
Expected: `Successfully installed lxml_html_clean-...`.

2. **Confirm the import your code uses**

```
python -c "from lxml_html_clean import Cleaner; print('ok')"
```
Expected: prints `ok`.

3. **If you own the failing import line, point it at the new package**

Replace:
```python
from lxml.html.clean import Cleaner
```
with:
```python
from lxml_html_clean import Cleaner
```
Expected: the module imports on lxml 5.2+ with no extra install beyond step 1.

## When this applies

- `import lxml_html_clean` or `from lxml.html.clean import ...` raises ModuleNotFoundError
- you upgraded lxml to 5.2+ and a previously working scraper broke
- a dependency (requests-html, newspaper3k, readability-lxml) fails at import mentioning clean

## When it does NOT apply

- `No module named 'lxml'` means lxml itself is missing
- the `ImportError: lxml.html.clean module is now a separate project lxml_html_clean` message is the same split seen from the other side

## Compatibility

lxml 5.2.0 and newer removed lxml.html.clean. The replacement package `lxml_html_clean` works with lxml 5.x. lxml 4.x and early 5.x still ship the old path.

## Variant phrasings

### `ImportError: lxml.html.clean module is now a separate project lxml_html_clean`

The explicit ImportError some packages raise to point you at the split. Same fix: `pip install lxml_html_clean`.

## Why it happens

The lxml maintainers moved the HTML-cleaning code out of the main distribution because it was a frequent CVE surface and most users never imported it. lxml 5.2 deleted `lxml/html/clean.py` entirely, and a tiny shim package `lxml_html_clean` took its place. Anything importing the old dotted path now fails unless the shim is installed.

## Edge cases

- If a dependency pins `lxml<5.2`, the old path keeps working, but pinning old lxml forfeits security fixes. Installing the shim is the better move.
- Some projects vendor their own clean.py copy. If yours does, the import error means the vendored copy is not on sys.path.
- On Python 3.12+, make sure the shim version you install has a wheel for your interpreter, otherwise pip builds from source.
