From e70f778dcc08aef856113f0aa6f2e06fe1d9ddf8 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Sun, 30 Nov 2025 16:54:19 +0100 Subject: [PATCH 1/4] parse:parse_journal_section - fix missing selectors for rating tag --- faapi/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faapi/parse.py b/faapi/parse.py index b0b605e..a3efb61 100644 --- a/faapi/parse.py +++ b/faapi/parse.py @@ -358,7 +358,7 @@ def parse_loggedin_user(page: BeautifulSoup) -> Optional[str]: def parse_journal_section(section_tag: Tag) -> dict[str, Any]: id_: int = int(section_tag.attrs.get("id", "00000")[4:]) tag_title: Optional[Tag] = section_tag.select_one("h2") - tag_rating: Optional[Tag] = section_tag.select_one("span.c-contentRating--general") + tag_rating: Optional[Tag] = section_tag.select_one("span.c-contentRating--general, span.c-contentRating--adult, span.c-contentRating--mature") tag_date: Optional[Tag] = section_tag.select_one("div.section-header span.popup_date") tag_content: Optional[Tag] = section_tag.select_one("div.journal-body") tag_comments: Optional[Tag] = section_tag.select_one("div.section-footer > a > span") From 09280220eab2a18e0c28d7759952ef75d6dd86c4 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Sun, 30 Nov 2025 16:55:39 +0100 Subject: [PATCH 2/4] changelog:3.12.1 - add fixes --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c580e..7aea9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v3.12.1 + +### Fixes + +* Fix error when parsing journals lists when one or more journals was not rated general + ## v3.12.0 ### New Features From c531fc42ae2eb62d2a2184178730b3b40f61b83d Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Sun, 30 Nov 2025 16:56:01 +0100 Subject: [PATCH 3/4] version - minor 3.12.0 > 3.12.1 --- faapi/__version__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/faapi/__version__.py b/faapi/__version__.py index d1a7f1e..555cdb2 100644 --- a/faapi/__version__.py +++ b/faapi/__version__.py @@ -1 +1 @@ -__version__ = "3.12.0" +__version__ = "3.12.1" diff --git a/pyproject.toml b/pyproject.toml index cd2eda6..0cbefd4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "faapi" -version = "3.12.0" +version = "3.12.1" description = "Python module to implement API-like functionality for the FurAffinity.net website." authors = ["Matteo Campinoti "] license = "EUPL-1.2" From c31e480b87868b2ae6d53391b201662cb76e63a8 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Sun, 30 Nov 2025 16:57:02 +0100 Subject: [PATCH 4/4] parse - format --- faapi/parse.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/faapi/parse.py b/faapi/parse.py index a3efb61..6a41653 100644 --- a/faapi/parse.py +++ b/faapi/parse.py @@ -20,6 +20,7 @@ from .connection import root from .exceptions import _raise_exception +from .exceptions import ClassicTheme from .exceptions import DisabledAccount from .exceptions import NonePage from .exceptions import NotFound @@ -27,7 +28,6 @@ from .exceptions import NoTitle from .exceptions import ParsingError from .exceptions import ServerError -from .exceptions import ClassicTheme relative_url: Pattern = re_compile(r"^(?:https?://(?:www\.)?furaffinity\.net)?(.*)") mentions_regexp: Pattern = re_compile(r"^(?:(?:https?://)?(?:www\.)?furaffinity\.net)?/user/([^/#]+).*$") @@ -358,7 +358,11 @@ def parse_loggedin_user(page: BeautifulSoup) -> Optional[str]: def parse_journal_section(section_tag: Tag) -> dict[str, Any]: id_: int = int(section_tag.attrs.get("id", "00000")[4:]) tag_title: Optional[Tag] = section_tag.select_one("h2") - tag_rating: Optional[Tag] = section_tag.select_one("span.c-contentRating--general, span.c-contentRating--adult, span.c-contentRating--mature") + tag_rating: Optional[Tag] = section_tag.select_one( + "span.c-contentRating--general" + ",span.c-contentRating--adult" + ",span.c-contentRating--mature" + ) tag_date: Optional[Tag] = section_tag.select_one("div.section-header span.popup_date") tag_content: Optional[Tag] = section_tag.select_one("div.journal-body") tag_comments: Optional[Tag] = section_tag.select_one("div.section-footer > a > span")