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.
Making a search without downloading anything #13436
Comments
|
https://github.com/rg3/youtube-dl#embedding-youtube-dl
|
|
@dstftw thank you so much, this solved my problem: from __future__ import unicode_literals
import youtube_dl
info = youtube_dl.YoutubeDL({}).extract_info('ytsearch:dank memes compilation', download=False, ie_key='YoutubeSearch')
info['entries'][0]['title']
info['entries'][0]['id'] |
Hi, I know it's possible to make a search with this command:
youtube-dl "ytsearch:dank memes compilation"I would like to be able to just make a search and get the URLs and Titles but not download anything.
My goal is using youtube-dl as a library or a tool in my project Dragonfire. I know youtube-dl is not a search tool but a downloader. But youtube-dl is maybe the only tool that guarantee to be always up to date with YouTube. So youtube-dl is the best option for such a task even if it's not the main purpose.
When I looked up to the source code, I found this function which is handling the request. So I have imported that part and tried to use it:
I got an error probably because it's not suppose to be used as the way I tried to use. So if it's not possible to use youtube-dl in such a way then this issue is a feature request😄
P.S. if the developers guide me then maybe I can implement this feature by myself and send a pull request...