mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Add missing "avg_rating"
This commit is contained in:
parent
c6ec8317ac
commit
138a6b1136
1 changed files with 2 additions and 0 deletions
|
@ -649,6 +649,8 @@ def fetch_video(id, proxies, region)
|
|||
dislikes = dislikes.try &.content.delete(",").try &.to_i?
|
||||
dislikes ||= 0
|
||||
|
||||
info["avg_rating"] = "#{(likes.to_f/(likes.to_f + dislikes.to_f) * 4 + 1)}"
|
||||
|
||||
description = html.xpath_node(%q(//p[@id="eow-description"]))
|
||||
description = description ? description.to_xml : ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue