You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML2Image is published on PyPI and can be installed through pip:
44
+
HTML2Image is published on PyPI and can be installed through `pip`:
45
45
46
46
```console
47
47
pip install --upgrade html2image
48
48
```
49
49
50
+
Or with `uv`:
51
+
```console
52
+
uv pip install html2image
53
+
```
54
+
50
55
In addition to this package, at least one of the following browsers **must** be installed on your machine :
51
56
- Google Chrome (Windows, MacOS)
52
57
- Chromium Browser (Linux)
@@ -317,15 +322,6 @@ You can load and execute a python script to use the package, or simply use the C
317
322
318
323
On top of that, you can also use [volumes](https://docs.docker.com/storage/volumes/) to bind a container directory to your local machine directory, allowing you to retrieve the generated images, or even load some resources (HTML, CSS or Python files).
319
324
320
-
## Testing
321
-
322
-
Only basic testing is available at the moment. To run tests, install the requirements (Pillow) and run PyTest at the root of the project:
323
-
```console
324
-
pip install -r requirements-test.txt
325
-
python -m pytest
326
-
```
327
-
328
-
329
325
## FAQ
330
326
331
327
- Can I automatically take a full page screenshot?
@@ -339,11 +335,52 @@ python -m pytest
339
335
340
336
- Can I make a cookie modal disappear?
341
337
**Yes and no**. **No**, because there is no options to do it magically and [extensions are not supported in headless Chrome](https://bugs.chromium.org/p/chromium/issues/detail?id=706008#c5) (The [`I don't care about cookies`](https://www.i-dont-care-about-cookies.eu/) extension would have been useful in this case). **Yes**, because you can make any element of a page disappear by retrieving its source code, modifying it as you wish, and finally screenshotting the modified source code.
338
+
339
+
340
+
## Contributing and Local Development
341
+
342
+
If you want to contribute to `html2image` or run tests locally, follow these steps:
version = "2.0.6"# todo take a look at dynamic versionning (e.g., hatch-vcs)
4
4
description = "Package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files."
0 commit comments