mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-16 01:48:51 +00:00
Extractors: Don't error if AuthorId does not exist (#3869)
Some playlist author's don't have a YouTube channel, so does movies. This caused various extractors (related videos, search) to fail. Closes the following issues: 2530, 3349, 3766, 3812, 4133
This commit is contained in:
@@ -822,9 +822,9 @@ module HelperExtractors
|
||||
end
|
||||
|
||||
# Retrieves the ID required for querying the InnerTube browse endpoint.
|
||||
# Raises when it's unable to do so
|
||||
# Returns an empty string when it's unable to do so
|
||||
def self.get_browse_id(container)
|
||||
return container.dig("navigationEndpoint", "browseEndpoint", "browseId").as_s
|
||||
return container.dig?("navigationEndpoint", "browseEndpoint", "browseId").try &.as_s || ""
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user