import IMDb vote count from user ratings
This commit is contained in:
parent
159ffce4b4
commit
3f9cec3e79
1 changed files with 4 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ log = logging.getLogger(__name__)
|
||||||
# div.ipl-rating-star.ipl-rating-star--other-user.small
|
# div.ipl-rating-star.ipl-rating-star--other-user.small
|
||||||
# span.ipl-rating-star__rating.text
|
# span.ipl-rating-star__rating.text
|
||||||
# p.text-muted.text ("Rated on 06 May 2021")
|
# 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):
|
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:
|
if not movie.media_type:
|
||||||
movie.media_type = "Movie"
|
movie.media_type = "Movie"
|
||||||
|
|
||||||
|
if match := item.find("span", attrs={"name": "nv"}):
|
||||||
|
movie.imdb_votes = int(match["data-value"])
|
||||||
|
|
||||||
rating = Rating()
|
rating = Rating()
|
||||||
|
|
||||||
ratings_item = item.find("div", "ipl-rating-widget")
|
ratings_item = item.find("div", "ipl-rating-widget")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue