mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add movies to search results
This commit is contained in:
parent
c166f46b7c
commit
bb604c8925
1 changed files with 2 additions and 2 deletions
|
@ -210,8 +210,6 @@ def extract_videos(nodeset, ucid = nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
case node.xpath_node(%q(.//div)).not_nil!["class"]
|
case node.xpath_node(%q(.//div)).not_nil!["class"]
|
||||||
when .includes? "yt-lockup-movie-vertical-poster"
|
|
||||||
next
|
|
||||||
when .includes? "yt-lockup-playlist"
|
when .includes? "yt-lockup-playlist"
|
||||||
next
|
next
|
||||||
when .includes? "yt-lockup-channel"
|
when .includes? "yt-lockup-channel"
|
||||||
|
@ -243,6 +241,7 @@ def extract_videos(nodeset, ucid = nil)
|
||||||
published = decode_date(metadata[0].content.lchop("Streamed ").lchop("Starts "))
|
published = decode_date(metadata[0].content.lchop("Streamed ").lchop("Starts "))
|
||||||
rescue ex
|
rescue ex
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
published ||= Time.epoch(metadata[0].xpath_node(%q(.//span)).not_nil!["data-timestamp"].to_i64)
|
published ||= Time.epoch(metadata[0].xpath_node(%q(.//span)).not_nil!["data-timestamp"].to_i64)
|
||||||
rescue ex
|
rescue ex
|
||||||
|
@ -253,6 +252,7 @@ def extract_videos(nodeset, ucid = nil)
|
||||||
view_count = metadata[0].content.rchop(" watching").delete(",").try &.to_i64?
|
view_count = metadata[0].content.rchop(" watching").delete(",").try &.to_i64?
|
||||||
rescue ex
|
rescue ex
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
view_count ||= metadata.try &.[1].content.delete("No views,").try &.to_i64?
|
view_count ||= metadata.try &.[1].content.delete("No views,").try &.to_i64?
|
||||||
rescue ex
|
rescue ex
|
||||||
|
|
Loading…
Reference in a new issue