spotify-dl icon indicating copy to clipboard operation
spotify-dl copied to clipboard

Verify that youtube video matches the search term

Open SathyaBhat opened this issue 8 years ago • 5 comments

https://twitter.com/bsgreenb/status/853456868655587329

spotify-dl is impressive. I'd recommend adding some basic levenstein or nlp to verify the youtube video matches the search term

SathyaBhat avatar Apr 19 '17 13:04 SathyaBhat

Can you give me some examples?

avinassh avatar Apr 19 '17 14:04 avinassh

Sure, something like this:

http://stackoverflow.com/questions/5859561/getting-the-closest-string-match

The idea is to use Levenshtein distance to ensure that what the track/artist that was searched for is a close match to what YouTube results return

-- Sathya http://sathyabh.at | http://sbhat.me

On Wed, Apr 19, 2017 at 7:41 PM, avinassh [email protected] wrote:

Can you give me some examples?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SathyaBhat/spotify-dl/issues/39#issuecomment-295283824, or mute the thread https://github.com/notifications/unsubscribe-auth/AABjUGUo5l4TSbQiB37SQjraczO4P0YIks5rxhYUgaJpZM4NBrAa .

SathyaBhat avatar Apr 19 '17 14:04 SathyaBhat

The idea is to use Levenshtein distance to ensure that what the track/artist that was searched for is a close match to what YouTube results return

How?

For example, if user enters Emenem and if YT returns no results, we should search for strings which are close match to Emenem?

So task here is to generate strings based on some fixed Levenshtein distance (may be .9+) and search for those?

avinassh avatar Apr 19 '17 14:04 avinassh

That's one option - the other way of looking is to calculate the distance of what was searched vs what was returned from the search and if it's beyond a threshold then don't download it

SathyaBhat avatar Apr 24 '17 13:04 SathyaBhat

Before the algorithm is run, the title should be tested against a white and blacklist. For example titles like [Artist]-[Song] (Official *music video*) should be automatically passed but titles containing remix or mashup shouldn't be downloaded

alvierahman90 avatar May 01 '17 19:05 alvierahman90