title: Youtube Search on Python 3.8
body: <p>I'm having trouble searching links on youtube, I tried google-api-python-client, along with the sample codes converted to python3, I tried to use the code below, the youtube search module hosted on pypi, I checked the key API, and it wasn't her. The code returns a bs4 error that I tried to solve, when I solve it it returns an empty list, with no link.</p>
  <p>Can anyone tell me a way to do a search on youtube and get the links using Python?
  Thank you very much for your help, I am using Python 3.8.3 and Windows 10 x86.</p>
  <p>youtube-search module: <a href="https://pypi.org/project/youtube-search/" rel="nofollow noreferrer">https://pypi.org/project/youtube-search/</a></p>
  <p>samples code: <a href="https://developers.google.com/youtube/v3/code_samples/python?hl=pt-br" rel="nofollow noreferrer">https://developers.google.com/youtube/v3/code_samples/python?hl=pt-br</a> (Python 2.x, I'm tryed a conversion to python3.x)</p>
  <p>My code with bs4 and urllib:</p>
  <pre><code>import urllib.request
  from bs4 import BeautifulSoup
  
  textToSearch = 'hello world'
  query = urllib.parse.quote(textToSearch)
  url = &quot;https://www.youtube.com/results?search_query=&quot; + query
  response = urllib.request.urlopen(url)
  html = response.read()
  soup = BeautifulSoup(html, 'html.parser')
  print(soup.findAll(attrs={&quot;class&quot;: &quot;yt-uix-tile-link&quot;}))
  
  for vid in soup.findAll(attrs={'class':'yt-uix-tile-link'}):
      print('https://www.youtube.com' + vid['href'])
  </code></pre>