Metadata-parser

Latest version: v0.12.3

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

Scan your dependencies

Page 7 of 14

0.8.2

- incorporated fix in https://github.com/jvanasco/metadata_parser/pull/10 to handle windows support of socket objects
- cleaned up some tests
- added `encode_ascii` helper
- added git-ignored `tests/private` directory for non-public tests
- added an `encoder` argument to `get_metadata` for encoding values

0.8.1

added 2 new properties to a computed MetadataParser object:
is_redirect = None
is_redirect_same_host = None
in the case of redirects, we only have the peername available for the final URL (not the source)
if a response is a redirect, it may not be for the same host -- and the peername would correspond to the destination URL -- not the origin

0.8.0

this bump introduces 2 new arguments and some changed behavior:

- `search_head_only=None`. previously the meta/og/etc data was only searched in the document head (where expected as per HTML specs).
after indexing millions of pages, many appeared to implement this incorrectly of have html that is so off specification that
parsing libraries can't correctly read it (for example, Twitter.com).
This is currently implemented to default from None to True, but future versions will default to `False`.
This is marked for a future default of `search_head_only=False`

- `raise_on_invalid`. default False. If True, this will raise a new exception: InvalidDocument if the response
does not look like a proper html document

0.7.4

- more aggressive attempts to get the peername.

0.7.3

- this will now try to cache the `peername` of the request (ie, the remote server) onto the peername attribute

0.7.2

- applying a `strip()` to the "title". bad authors/cms often have whitespace.

Page 7 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.