ytmusicapi.models package
Subpackages
Submodules
ytmusicapi.models.lyrics module
- class ytmusicapi.models.lyrics.LyricLine(text: str, start_time: int, end_time: int, id: int) None
Bases:
objectRepresents a line of lyrics with timestamps (in milliseconds).
- Parameters:
(str) (text) – The Songtext.
(int) (id) – Begin of the lyric in milliseconds.
(int) – End of the lyric in milliseconds.
(int) – A Metadata-Id that probably uniquely identifies each lyric line.
-
end_time:
int
- classmethod from_raw(raw_lyric: dict[str, Any]) ytmusicapi.models.lyrics.LyricLine
Converts lyrics in the format from the api to a more reasonable format
- Parameters:
raw_lyric (
dict[str,Any]) – The raw lyric-data returned by the mobile api.- Return LyricLine:
A LyricLine
- Return type:
-
id:
int
-
start_time:
int
-
text:
str
Module contents
- class ytmusicapi.models.LyricLine(text: str, start_time: int, end_time: int, id: int) None
Bases:
objectRepresents a line of lyrics with timestamps (in milliseconds).
- Parameters:
(str) (text) – The Songtext.
(int) (id) – Begin of the lyric in milliseconds.
(int) – End of the lyric in milliseconds.
(int) – A Metadata-Id that probably uniquely identifies each lyric line.
-
end_time:
int
- classmethod from_raw(raw_lyric: dict[str, Any]) ytmusicapi.models.lyrics.LyricLine
Converts lyrics in the format from the api to a more reasonable format
- Parameters:
raw_lyric (
dict[str,Any]) – The raw lyric-data returned by the mobile api.- Return LyricLine:
A LyricLine
- Return type:
-
id:
int
-
start_time:
int
-
text:
str