mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-21 18:38:50 +00:00
Youtube api improvements (#2277)
* Put youtube API functions under the YoutubeAPI namespace * Implement the following endpoints: - `next` - `player` - `resolve_url` * Allow a ClientConfig to be passed to YoutubeAPI endpoint handlers. * Add constants for many new clients * Fix documentation of YoutubeAPI.browse(): Comments and search result aren't returned by the browse() endpoint but by the next() and search() endpoints, respectively. * Accept gzip compressed data, to help save on bandwidth * Add debug/trace logging * Other minor fixes
This commit is contained in:
@@ -14,7 +14,8 @@ def fetch_trending(trending_type, region, locale)
|
||||
params = ""
|
||||
end
|
||||
|
||||
initial_data = request_youtube_api_browse("FEtrending", params: params, region: region)
|
||||
client_config = YoutubeAPI::ClientConfig.new(region: region)
|
||||
initial_data = YoutubeAPI.browse("FEtrending", params: params, client_config: client_config)
|
||||
trending = extract_videos(initial_data)
|
||||
|
||||
return {trending, plid}
|
||||
|
||||
Reference in New Issue
Block a user