diff --git a/CHANGELOG.md b/CHANGELOG.md index fd1e2cf..9c32dff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## v3.12.7 + +### Fixes + +* Fix parsing of mentions + * Some anchor links are rendered without a href property, causing the parser to fail + ## v3.12.6 ### Fixes diff --git a/faapi/__version__.py b/faapi/__version__.py index 8f4725c..1980816 100644 --- a/faapi/__version__.py +++ b/faapi/__version__.py @@ -1 +1 @@ -__version__ = "3.12.6" +__version__ = "3.12.7" diff --git a/faapi/parse.py b/faapi/parse.py index 9903495..570078f 100644 --- a/faapi/parse.py +++ b/faapi/parse.py @@ -346,7 +346,7 @@ def parse_username_from_url(url: str) -> Optional[str]: def parse_mentions(tag: Tag) -> list[str]: - mentions: list[str] = [username_url(m[1]) for a in tag.select("a") + mentions: list[str] = [username_url(m[1]) for a in tag.select("a[href]") if (m := match(mentions_regexp, get_attr(a, "href")))] return sorted(set([m for m in mentions if m]), key=mentions.index) diff --git a/pyproject.toml b/pyproject.toml index 02e4a31..ce4e5c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "faapi" -version = "3.12.6" +version = "3.12.7" description = "Python module to implement API-like functionality for the FurAffinity.net website." authors = ["Matteo Campinoti "] license = "EUPL-1.2"