Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
**Search** for appropriate video(s) on YouTube #3319
Comments
|
If anyone wants to use this for reference, I wrote something that shells out to youtube-dl to do exactly what's being asked: https://github.com/dean/YoutubeDL. |
|
This feature is already implemented. Use Where did you look for this feature, and what search terms did you use? |
|
@dean No offense, but you've essentially recreated parts of youtube-dl. In particular, have a look at the |
|
Gah, I'm sorry. I did notice Thanks for the help and for maintaining such a well-though piece of software! |
|
@phihag Sorry for the late reply, but I'm not quite sure you read exactly what my code does. Mine will take queries in the form of 'title - artist\n' for each line of a file, query youtube with the search terms, then look at the results and compare lengths of videos, whether or not a video is hd, and look at view counts to determine the best video to download (although it's audio only at the moment). It's meant to be smarter than just taking the first result of the queried string. |
|
I'm well-aware that your algorithm does more than simple searching. Nevertheless, search and information extraction is highly redundant with the built-in features of youtube-dl. Try |
This is a feature request. This is how I imagine it:
The user uses
--yt-search(or appropriate) switch with a string argument which can either be a search query or a filename with search queries one per line.youtube-dlthen uses publicly provided YouTube API to get for each query the most similar matches, electing the most preferable one by some heuristic involving e.g. result position, Levenshtein string distance, video meta-attributes like quality, popularity, ..., and downloads it (acting as if that was theurlprovided, honoring all other command line switches, for each query), or reports no suitable matches found.If you find this a desirable feature, I may be able to provide a pull request if you remind me in a few weeks. However, if you think there is not a lot of work which is more elegantly accomplished by someone who knows the codebase better, I'd take anybody up on that. :P
In either case, some guidelines and feedback are in order.