diff --git a/CHANGELOG.md b/CHANGELOG.md index e01e32e..25864cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v3.11.14 + +### Fixes + +* Fix `FAAPI.watchlist_by` and `FAAPI.watchlist_to` returning display name instead of username + ## v3.11.13 ### New Features diff --git a/faapi/__version__.py b/faapi/__version__.py index aae930d..53c71cd 100644 --- a/faapi/__version__.py +++ b/faapi/__version__.py @@ -1 +1 @@ -__version__ = "3.11.13" +__version__ = "3.11.14" diff --git a/faapi/parse.py b/faapi/parse.py index 5bdeb2f..443aa4c 100644 --- a/faapi/parse.py +++ b/faapi/parse.py @@ -888,10 +888,10 @@ def parse_watchlist(watch_page: BeautifulSoup) -> tuple[list[tuple[str, str]], O watches: list[tuple[str, str]] = [] for tag_user in watch_page.select("div.watch-list-items"): - user_link: Optional[Tag] = tag_user.select_one("a") + user_link: Optional[Tag] = tag_user.select_one('a[href^="/user/"]') assert user_link, _raise_exception(ParsingError("Missing user link")) - username: str = user_link.text.strip() + username: str = get_attr(user_link, "href").removeprefix("/user/").strip("/") user_link.decompose() status: str = tag_user.text.strip() diff --git a/pyproject.toml b/pyproject.toml index 326b5b6..7700f03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "faapi" -version = "3.11.13" +version = "3.11.14" description = "Python module to implement API-like functionality for the FurAffinity.net website." authors = ["Matteo Campinoti "] license = "EUPL-1.2"