title: Youtube search command for discord.py
body: <p>Simple. I am making a youtube search command for discord using python
  This is the code:</p>
  <pre><code>async def youtube(ctx, *, search):
      query_string = urllib.parse.urlencode({
          'search_query': search
      })
      htm_content = urllib.request.urlopen(
          'http://www.youtube.com/results?' + query_string
      )
      search_results = re.findall('href=\&quot;\\/watch\\?v=(.{11})', htm_content.read().decode())
      await ctx.send('http://www.youtube.com/watch?v=' + search_results[0])
  </code></pre>
  <p>The error that I am having is this:</p>
  <pre><code>Ignoring exception in command youtube:
  Traceback (most recent call last):
    File &quot;C:\Users\Ryzen\AppData\Roaming\Python\Python37\site-packages\discord\ext\commands\core.py&quot;, line 83, in wrapped
      ret = await coro(*args, **kwargs)
    File &quot;C:\Users\Ryzen\Desktop\ae\bot\bot 2.0\bot.py&quot;, line 738, in youtube
      await ctx.send('http://www.youtube.com/watch?v=' + search_results[0])
  IndexError: list index out of range
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File &quot;C:\Users\Ryzen\AppData\Roaming\Python\Python37\site-packages\discord\ext\commands\bot.py&quot;, line 892, in invoke
      await ctx.command.invoke(ctx)
    File &quot;C:\Users\Ryzen\AppData\Roaming\Python\Python37\site-packages\discord\ext\commands\core.py&quot;, line 797, in invoke
      await injected(*ctx.args, **ctx.kwargs)
    File &quot;C:\Users\Ryzen\AppData\Roaming\Python\Python37\site-packages\discord\ext\commands\core.py&quot;, line 92, in wrapped
      raise CommandInvokeError(exc) from exc
  discord.ext.commands.errors.CommandInvokeError: Command raised an exception: IndexError: list index out of range
  </code></pre>
  <p>Thanks</p>