1.7 KiB
1.7 KiB
Search
Files
what is it | query | file |
---|---|---|
general search response | psychonaut 4 |
general-result.json |
A general search yields
- Top Result
- The top Artist
- The most popular songs of said artist
- Songs (3) excluding the top songs
- Videos (3)
- Albums (3)
- Community playlists (3)
- Artists (3) excluding the top artist
- if you search for a artist, it might return simmilar artists in style, not in name
Different Renderers
runs
This should be pretty consistently all over the response be parsebal to a list of Music Elements.
runs
usually is a list. If a element of the list has the key navigationEndpoint
, it represents a music elements in a following manner:
text
the namenavigationEndpoint
->browseEndpoint
browseId
the id of the artist/song/album...browseEndpointContextSupportedConfigs
->browseEndpointContextMusicConfig
->pageType
the type of the header like element
musicCardShelfRenderer
Used by e.g. the Top Results
.
Contains:
- One Main-Element (a header like music object) | consists of these keys:
thumbnail
the image of the headertitle
->runs
- for details look here.
Details
You can get the contents (a list of renderers) this way:
data = r.json().get("contents", {}).get("tabbedSearchResultsRenderer", {}).get("tabs", [{}])[0].get("tabRenderer").get("content", {}).get("sectionListRenderer", {}).get("contents", [])
Then the list contains following items, in following order:
- About these results (an infobutton)
- The Top result
- The Songs [musicShelfRenderer]
- ...