Zimscraperlib

Latest version: v5.1.1

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

Scan your dependencies

Page 6 of 8

1.3.5

Not secure
- add `stream_file()` to stream content from a URL into a file or a `BytesIO` object
- deprecated `save_file()`
- fixed `add_binary` when used without an fpath (69)
- deprecated `make_grayscale` option in image optimization
- Added support for in-memory optimization for PNG, JPEG, and WebP images
- allows enabling debug logs via ZIMSCRAPERLIB_DEBUG environ

1.3.4

Not secure
- added `wait` option in `YoutubeDownloader` to allow parallelism while using context manager
- do not use extension for finding format in `ensure_matches()` in `image.optimization` module
- added `VideoWebmHigh` and `VideoMp4High` presets for high quality WebM and Mp4 convertion respectively
- updated presets `WebpHigh`, `JpegMedium`, `JpegLow` and `PngMedium` in `image.presets`
- `save_image` moved from `image` to `image.utils`
- added `convert_image` `optimize_image` `resize_image` functions to `image` module

1.3.3

Not secure
- added `YoutubeDownloader` to `download` to download YT videos using a capped nb of threads

1.3.2

Not secure
- fixed rewriting of links with empty target
- added support for image optimization using `zimscraperlib.image.optimization` for webp, gif, jpeg and png formats
- added `format_for()` in `zimscraperlib.image.probing` to get PIL image format from the suffix

1.3.1

Not secure
- replaced BeautifoulSoup parser in rewriting (`html.parser` –> `lxml`)

1.3.0

Not secure
- detect mimetypes from filenames for all text files
- fixed non-filename based StaticArticle
- enable rewriting of links in poster attribute of audio element
- added find_language_in() and find_language_in_file() to get language from HTML content and HTML file respectively
- add a mime mapping to deal with inconsistencies in mimetypes detected by magic on different platforms
- convert_image signature changed:
- `target_format` positional argument removed. Replaced with optionnal `fmt` key of keyword arguments.
- `colorspace` optionnal positional argument removed. Replaced with optionnal `colorspace` key of keyword arguments.
- prevent rewriting of links with special schemes `mailto`, 'tel', etc. in HTML links rewriting
- replaced `imaging` module with exploded `image` module (`convertion`, `probing`, `transformation`)
- changed `create_favicon()` param names (`source_image` -> `src`, `dest_ico` -> `dst`)
- changed `save_image()` param names (`image` -> `src`)
- changed `get_colors()` param names (`image_path` -> `src`)
- changed `resize_image()` param names (`fpath` -> `src`)

Page 6 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.