From 76272b7e39c82f062547017d01868a14ea9cb4ea Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 1 Nov 2024 22:42:42 -0400 Subject: [PATCH] [beers] Fix rating error --- vrobbler/apps/beers/untappd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vrobbler/apps/beers/untappd.py b/vrobbler/apps/beers/untappd.py index b46d8c5..86f0b60 100644 --- a/vrobbler/apps/beers/untappd.py +++ b/vrobbler/apps/beers/untappd.py @@ -87,11 +87,11 @@ def get_ibu_from_soup(soup) -> Optional[int]: def get_rating_from_soup(soup) -> str: rating = "" try: - rating = soup.find(class_="num").get_text().strip("(").strip(")") + rating = float(soup.find(class_="num").get_text().strip("(").strip(")")) except AttributeError: - pass + rating = None except ValueError: - pass + rating = None return rating