ytmusicapi.parsers package
**************************


Submodules
==========


ytmusicapi.parsers.albums module
================================

ytmusicapi.parsers.albums.parse_album_header(response: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.albums.parse_album_header_2024(response: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.albums.parse_album_playlistid_if_exists(data: dict[str, Any] | None) -> str | None

   the content of the data changes based on whether the user is
   authenticated or not

   Return type:
      "str" | "None"


ytmusicapi.parsers.browsing module
==================================

ytmusicapi.parsers.browsing.parse_album(result: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.browsing.parse_content_list(results: list[dict[str, Any]], parse_func: Callable[[dict[str, Any]], dict[str, Any]], key: str = 'musicTwoRowItemRenderer') -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.browsing.parse_mixed_content(rows: list[dict[str, Any]]) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.browsing.parse_playlist(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.browsing.parse_related_artist(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.browsing.parse_single(result: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.browsing.parse_song(result: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.browsing.parse_song_flat(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.browsing.parse_video(result: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.browsing.parse_watch_playlist(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]


ytmusicapi.parsers.explore module
=================================

ytmusicapi.parsers.explore.parse_chart_artist(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.explore.parse_chart_episode(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.explore.parse_chart_playlist(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.explore.parse_chart_song(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.explore.parse_ranking(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.explore.parse_trending_song(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]


ytmusicapi.parsers.i18n module
==============================

class ytmusicapi.parsers.i18n.Parser(language: GNUTranslations) -> None

   Bases: "object"

   get_api_result_types() -> list[str]

      Return type:
         "list"["str"]

   get_search_result_types() -> list[str]

      Return type:
         "list"["str"]

   parse_channel_contents(results: list[dict[str, Any]]) -> dict[str, Any]

      Return type:
         "dict"["str", "Any"]


ytmusicapi.parsers.library module
=================================

ytmusicapi.parsers.library.get_library_contents(response: dict[str, Any], renderer: list[str]) -> dict[str, Any] | None

   Find library contents. This function is a bit messy now as it is
   supporting two different response types. Can be cleaned up once all
   users are migrated to the new responses. :type response:
   "dict"["str", "Any"] :param response: ytmusicapi response :type
   renderer: "list"["str"] :param renderer: GRID or MUSIC_SHELF
   :rtype: "dict"["str", "Any"] | "None" :return: library contents or
   None

ytmusicapi.parsers.library.parse_albums(results: list[dict[str, Any]]) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.library.parse_artists(results: list[dict[str, Any]], uploaded: bool = False) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.library.parse_library_albums(response: dict[str, Any], request_func: Callable[[str], dict[str, Any]], limit: int | None) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.library.parse_library_artists(response: dict[str, Any], request_func: Callable[[str], dict[str, Any]], limit: int | None) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.library.parse_library_podcasts(response: dict[str, Any], request_func: Callable[[str], dict[str, Any]], limit: int | None) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.library.parse_library_songs(response: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.library.pop_songs_random_mix(results: dict[str, Any] | None) -> None

   remove the random mix that conditionally appears at the start of
   library songs

   Return type:
      "None"


ytmusicapi.parsers.playlists module
===================================

ytmusicapi.parsers.playlists.parse_audio_playlist(response: dict[str, Any], limit: int | None, request_func: Callable[[dict[str, Any]], dict[str, Any]]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.playlists.parse_playlist_header(response: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.playlists.parse_playlist_header_meta(header: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.playlists.parse_playlist_item(data: dict[str, Any], menu_entries: list[list[str]] | None = None, is_album: bool = False) -> dict[str, Any] | None

   Return type:
      "dict"["str", "Any"] | "None"

ytmusicapi.parsers.playlists.parse_playlist_items(results: list[dict[str, Any]], menu_entries: list[list[str]] | None = None, is_album: bool = False) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.playlists.validate_playlist_id(playlistId: str) -> str

   Return type:
      "str"


ytmusicapi.parsers.podcasts module
==================================

class ytmusicapi.parsers.podcasts.Description(*args: Any, **kwargs: Any)

   Bases: "list"["DescriptionElement"]

   classmethod from_runs(description_runs: list[dict[str, Any]]) -> Description

      parse the description runs into a usable format

      Parameters:
         **description_runs** ("list"["dict"["str", "Any"]]) -- the
         original description runs

      Return type:
         "Description"

      Returns:
         List of text (str), timestamp (int) and link values (Link
         object)

   property text: str

class ytmusicapi.parsers.podcasts.DescriptionElement(text: str) -> None

   Bases: "object"

   text: "str"

class ytmusicapi.parsers.podcasts.Link(text: str, url: str) -> None

   Bases: "DescriptionElement"

   url: "str"

class ytmusicapi.parsers.podcasts.Timestamp(text: str, seconds: int) -> None

   Bases: "DescriptionElement"

   seconds: "int"

ytmusicapi.parsers.podcasts.parse_base_header(header: dict[str, Any]) -> dict[str, Any]

   parse common left hand side (header) items of an episode or podcast
   page

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.podcasts.parse_episode(data: dict[str, Any]) -> dict[str, Any]

   Parses a single episode under "Episodes" on a channel page or on a
   podcast page

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.podcasts.parse_episode_header(header: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.podcasts.parse_podcast(data: dict[str, Any]) -> dict[str, Any]

   Parses a single podcast under "Podcasts" on a channel page

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.podcasts.parse_podcast_header(header: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]


ytmusicapi.parsers.search module
================================

ytmusicapi.parsers.search.get_search_params(filter: str | None, scope: str | None, ignore_spelling: bool) -> str | None

   Get search params for search query string based on user input

   Parameters:
      * **filter** ("str" | "None") -- The search filter

      * **scope** ("str" | "None") -- The search scope

      * **ignore_spelling** ("bool") -- If spelling shall be ignored

   Return type:
      "str" | "None"

   Returns:
      search param string

ytmusicapi.parsers.search.get_search_result_type(result_type_local: str, result_types_local: list[str]) -> str | None

   Return type:
      "str" | "None"

ytmusicapi.parsers.search.parse_search_result(data: dict[str, Any], api_search_result_types: list[str], result_type: str | None, category: str | None) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]

ytmusicapi.parsers.search.parse_search_results(results: list[dict[str, Any]], api_search_result_types: list[str], resultType: str | None = None, category: str | None = None) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.search.parse_search_suggestions(results: dict[str, Any], detailed_runs: bool) -> list[str] | list[dict[str, Any]]

   Return type:
      "list"["str"] | "list"["dict"["str", "Any"]]

ytmusicapi.parsers.search.parse_top_result(data: dict[str, Any], search_result_types: list[str]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]


ytmusicapi.parsers.songs module
===============================

ytmusicapi.parsers.songs.parse_like_status(service: dict[str, Any]) -> str

   Return type:
      "str"

ytmusicapi.parsers.songs.parse_song_album(data: dict[str, Any], index: int) -> dict[str, Any] | None

   Return type:
      "dict"["str", "Any"] | "None"

ytmusicapi.parsers.songs.parse_song_artists(data: dict[str, Any], index: int) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.songs.parse_song_artists_runs(runs: list[dict[str, Any]]) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.songs.parse_song_library_status(item: dict[str, Any]) -> bool

   Returns True if song is in the library

   Return type:
      "bool"

ytmusicapi.parsers.songs.parse_song_menu_tokens(item: dict[str, Any]) -> dict[str, str | None]

   Return type:
      "dict"["str", "str" | "None"]

ytmusicapi.parsers.songs.parse_song_runs(runs: list[dict[str, Any]]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]


ytmusicapi.parsers.uploads module
=================================

ytmusicapi.parsers.uploads.parse_uploaded_items(results: list[dict[str, Any]]) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]


ytmusicapi.parsers.watch module
===============================

ytmusicapi.parsers.watch.get_tab_browse_id(watchNextRenderer: dict[str, Any], tab_id: int) -> str | None

   Return type:
      "str" | "None"

ytmusicapi.parsers.watch.parse_watch_playlist(results: list[dict[str, Any]]) -> list[dict[str, Any]]

   Return type:
      "list"["dict"["str", "Any"]]

ytmusicapi.parsers.watch.parse_watch_track(data: dict[str, Any]) -> dict[str, Any]

   Return type:
      "dict"["str", "Any"]


Module contents
===============
