forked from midou/invidious
Rename transcript() to get_transcript() in YT API
This commit is contained in:
parent
e4942b188f
commit
3509752b79
@ -89,7 +89,7 @@ module Invidious::Routes::API::V1::Videos
|
|||||||
|
|
||||||
if CONFIG.use_innertube_for_captions
|
if CONFIG.use_innertube_for_captions
|
||||||
params = Invidious::Videos::Transcript.generate_param(id, caption.language_code, caption.auto_generated)
|
params = Invidious::Videos::Transcript.generate_param(id, caption.language_code, caption.auto_generated)
|
||||||
initial_data = YoutubeAPI.transcript(params.to_s)
|
initial_data = YoutubeAPI.get_transcript(params)
|
||||||
|
|
||||||
webvtt = Invidious::Videos::Transcript.convert_transcripts_to_vtt(initial_data, caption.language_code)
|
webvtt = Invidious::Videos::Transcript.convert_transcripts_to_vtt(initial_data, caption.language_code)
|
||||||
else
|
else
|
||||||
|
@ -558,7 +558,7 @@ module YoutubeAPI
|
|||||||
end
|
end
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
# transcript(params)
|
# get_transcript(params, client_config?)
|
||||||
#
|
#
|
||||||
# Requests the youtubei/v1/get_transcript endpoint with the required headers
|
# Requests the youtubei/v1/get_transcript endpoint with the required headers
|
||||||
# and POST data in order to get a JSON reply.
|
# and POST data in order to get a JSON reply.
|
||||||
@ -569,7 +569,7 @@ module YoutubeAPI
|
|||||||
# `struct ClientConfig` above for more details).
|
# `struct ClientConfig` above for more details).
|
||||||
#
|
#
|
||||||
|
|
||||||
def transcript(
|
def get_transcript(
|
||||||
params : String,
|
params : String,
|
||||||
client_config : ClientConfig | Nil = nil
|
client_config : ClientConfig | Nil = nil
|
||||||
) : Hash(String, JSON::Any)
|
) : Hash(String, JSON::Any)
|
||||||
|
Loading…
Reference in New Issue
Block a user