SathyaBhat / spotify-dl

Downloads songs from your Spotify Playlist
http://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/
MIT License
1.73k stars 212 forks source link

Change the query to search songs with YouTube #374

Closed tposejank closed 3 months ago

tposejank commented 7 months ago

Is your feature request related to a problem? Please describe. Problem is very common: not downloading correct tracks. My proposed solution is below: Change the query the youtube.py file does so that:

Describe the solution you'd like Instead of query being: "Artist - Song Lyrics" It can be: "Artist - Song Official Audio", preferably if the Song goes before the artist: "Song - Artist Official Audio". So that YouTube can give as results the artist's official audio (usually the square image or a video with just the audio)

Additional context As an example: Frizk, who made a popular TikTok audio, searching for any of his other songs may result to getting the popular audio as a first result, also being that he does not have many sung releases.

If it is unclear what I am mentioning: here

Maritsu commented 6 months ago

I'm having issues with this too; so far I've come up with maybe dropping the 'Lyrics' search tag, making use of Sponsorblock and additionally searching on YT Music instead?

tposejank commented 6 months ago

I'm having issues with this too; so far I've come up with maybe dropping the 'Lyrics' search tag, making use of Sponsorblock and additionally searching on YT Music instead?

I also thought about YT Music for this issue, but I scrapped the idea since the YT library may not support it.

Maritsu commented 6 months ago

It seems like the built-in search function of yt-dlp doesn't support YT Music, but there's a library called ytmusicapi that could be used to get the song's URL (as seen in this SO thread). i'll try forking the project and implementing this