mirror of https://github.com/iv-org/invidious.git
switched to extract_selected_tab for the community tab
This commit is contained in:
parent
a8b72d8342
commit
864f27ef72
|
@ -13,13 +13,11 @@ def fetch_channel_community(ucid, continuation, locale, format, thin_mode)
|
||||||
|
|
||||||
if !continuation || continuation.empty?
|
if !continuation || continuation.empty?
|
||||||
initial_data = extract_initial_data(response.body)
|
initial_data = extract_initial_data(response.body)
|
||||||
body = initial_data["contents"]?.try &.["twoColumnBrowseResultsRenderer"]["tabs"].as_a.select { |tab| tab["tabRenderer"]?.try &.["selected"]?.try &.as_bool == true }[0]?
|
body = extract_selected_tab(initial_data["contents"]["twoColumnBrowseResultsRenderer"]["tabs"])["content"]["sectionListRenderer"]["contents"][0]["itemSectionRenderer"]
|
||||||
|
|
||||||
if !body
|
if !body
|
||||||
raise InfoException.new("Could not extract community tab.")
|
raise InfoException.new("Could not extract community tab.")
|
||||||
end
|
end
|
||||||
|
|
||||||
body = body["tabRenderer"]["content"]["sectionListRenderer"]["contents"][0]["itemSectionRenderer"]
|
|
||||||
else
|
else
|
||||||
continuation = produce_channel_community_continuation(ucid, continuation)
|
continuation = produce_channel_community_continuation(ucid, continuation)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue