sigma67 / ytmusicapi

Unofficial API for YouTube Music
https://ytmusicapi.readthedocs.io
MIT License
1.59k stars 182 forks source link

Search results contain invalid extra "artists" #569

Closed zehkira closed 1 month ago

zehkira commented 3 months ago

Describe the bug Items returned by search() have an extra artist with the name set to the result type ("Album", "Single", "Video", "Song") and id set to None.

[
    {
        "category": "Top result",
        "resultType": "video",
        "videoId": "n5O0iA--sec",
        "videoType": "MUSIC_VIDEO_TYPE_OMV",
        "title": "To the Ends of the Earth",
        "artists": [
            {"name": "Video", "id": None},
            {"name": "NateWantsToBattle", "id": "UCn47DsiwQ9btGilwnBBKSgg"},
        ],
        "views": "2.6M",
        "duration": "3:14",
        "duration_seconds": 194,
        "thumbnails": [
            {
                "url": "https://i.ytimg.com/vi/n5O0iA--sec/sddefault.jpg?sqp=-oaymwEWCJADEOEBIAQqCghqEJQEGHgg6AJIWg&rs=AMzJL3kuUmMHOgYzcj5FYBRsyJ9ELACoVg",
                "width": 400,
                "height": 225,
            }
        ],
    }
]

To Reproduce Steps to reproduce the behavior:

>>> from ytmusicapi import YTMusic
>>> YTMusic().search('to the ends of the earth nate')

Additional context

zee:box: ~ $ pip show ytmusicapi
Name: ytmusicapi
Version: 1.6.0
sigma67 commented 1 month ago

@zehkira please verify that the linked PR fixes your issue

zehkira commented 1 month ago

It does :+1: