title: Searching Youtube videos using youtube-dl
body: <p>I am trying to build a Discord Music Bot and I need to search the YouTube using keywords given by the user. Currently I know how to play from a url.</p>
  <pre><code>       loop = loop or asyncio.get_event_loop()
         data = await loop.run_in_executor( None, lambda: ytdl.extract_info(url, download=not stream))
         if &quot;entries&quot; in data:
              data = data[&quot;entries&quot;][0]
  
          filename = data[&quot;url&quot;] if stream else ytdl.prepare_filename(data)
          return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)
  </code></pre>