mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
comments: don't error out when video has no comments
continuationItems is nil when video has no comments
This commit is contained in:
parent
85ba04b715
commit
7112f35793
1 changed files with 2 additions and 1 deletions
|
@ -78,7 +78,8 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b
|
|||
when "RELOAD_CONTINUATION_SLOT_HEADER"
|
||||
header = item["reloadContinuationItemsCommand"]["continuationItems"][0]
|
||||
when "RELOAD_CONTINUATION_SLOT_BODY"
|
||||
contents = item["reloadContinuationItemsCommand"]["continuationItems"]
|
||||
# continuationItems is nil when video has no comments
|
||||
contents = item["reloadContinuationItemsCommand"]["continuationItems"]?
|
||||
end
|
||||
elsif item["appendContinuationItemsAction"]?
|
||||
contents = item["appendContinuationItemsAction"]["continuationItems"]
|
||||
|
|
Loading…
Reference in a new issue