mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Fix lint
This commit is contained in:
parent
2a32f84332
commit
38110801a7
1 changed files with 17 additions and 17 deletions
|
@ -358,28 +358,28 @@ private module Parsers
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# YouTube doesn't provide dislikes.
|
# YouTube doesn't provide dislikes.
|
||||||
likes = short_text_to_number(item_contents["voteCount"]["simpleText"].as_s.split(" ")[0])
|
likes = short_text_to_number(item_contents["voteCount"]["simpleText"].as_s.split(" ")[0])
|
||||||
|
|
||||||
comments = item_contents.dig?("actionButtons", "commentActionButtonsRenderer",
|
comments = item_contents.dig?("actionButtons", "commentActionButtonsRenderer",
|
||||||
"replyButton", "buttonRenderer", "text", "simpleText").try { |t| short_text_to_number(t.as_s) } || 0
|
"replyButton", "buttonRenderer", "text", "simpleText").try { |t| short_text_to_number(t.as_s) } || 0
|
||||||
|
|
||||||
published = item_contents["publishedTimeText"]["runs"][0]["text"].try { |t| decode_date(t.as_s.rstrip(" (edited)")) } || Time.local
|
published = item_contents["publishedTimeText"]["runs"][0]["text"].try { |t| decode_date(t.as_s.rstrip(" (edited)")) } || Time.local
|
||||||
|
|
||||||
YouTubeStructs::CommunityPost.new({
|
YouTubeStructs::CommunityPost.new({
|
||||||
author: author_name,
|
author: author_name,
|
||||||
author_id: author_id,
|
author_id: author_id,
|
||||||
author_thumbnail: author_thumbnail,
|
author_thumbnail: author_thumbnail,
|
||||||
post_id: post_id,
|
post_id: post_id,
|
||||||
content_html: contents,
|
content_html: contents,
|
||||||
attachment: attachment,
|
attachment: attachment,
|
||||||
likes: likes,
|
likes: likes,
|
||||||
comments: comments,
|
comments: comments,
|
||||||
published: published,
|
published: published,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# The following are the extractors for extracting an array of items from
|
# The following are the extractors for extracting an array of items from
|
||||||
# the internal Youtube API's JSON response. The result is then packaged into
|
# the internal Youtube API's JSON response. The result is then packaged into
|
||||||
|
|
Loading…
Reference in a new issue