Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion faapi/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.12.0"
__version__ = "3.12.1"
8 changes: 6 additions & 2 deletions faapi/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@

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
from .exceptions import NoticeMessage
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/([^/#]+).*$")
Expand Down Expand Up @@ -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")
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")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <matteo.campinoti94@gmail.com>"]
license = "EUPL-1.2"
Expand Down