music.youtube.com downloader/scraper

52 views Asked by At

I want to make a script that search by Artist name on music.youtube.com and download the artist all music from YouTube Music and this should must search on YouTube Music only not in YouTube. I searched a lot about it but I found all resources about YouTube but I found one library that search on youtube music and return a result of search but it will return only one music data but I want all music of the searched artist only

The code that use library is given below:

import YouTubeMusicAPI

query: str = "Shubh"

result = YouTubeMusicAPI.search(query)

if result:
    print(result)
else:
    print("No Result Found")

Output:

{
    'title': 'King Shit',
    'id': '1usErKKsNGM',
    'url': 'https://music.youtube.com/watch?v=1usErKKsNGM',
    'artwork': 'https://img.youtube.com/vi/1usErKKsNGM/0.jpg',
    'author': {
        'name': 'Shubh - Topic',
        'url': 'https://www.youtube.com/channel/UCDoxhZGShhNvN4Bc3nWZptg'
    }
}

I want that I will search by artist name and download all it music available on music.youtube.com. If there is already build library that do this similar things that I want so tell me I will use and modify it according to my need. or any expert opinion like should I write the code from scratch or not.

0

There are 0 answers