diff --git a/unwind/imdb.py b/unwind/imdb.py index a110ece..0da9091 100644 --- a/unwind/imdb.py +++ b/unwind/imdb.py @@ -32,6 +32,7 @@ log = logging.getLogger(__name__) # div.ipl-rating-star.ipl-rating-star--other-user.small # span.ipl-rating-star__rating.text # p.text-muted.text ("Rated on 06 May 2021") +# p.text-muted.text-small span[name=nv] [data-value] async def refresh_user_ratings_from_imdb(stop_on_dupe=True): @@ -126,6 +127,9 @@ def movie_and_rating_from_item(item) -> tuple[Movie, Rating]: if not movie.media_type: movie.media_type = "Movie" + if match := item.find("span", attrs={"name": "nv"}): + movie.imdb_votes = int(match["data-value"]) + rating = Rating() ratings_item = item.find("div", "ipl-rating-widget")