title: How to scrape youtube videos to get more videos than on one page?
body: <p>I want to scrape youtube to collect descriptions about videos based on my search query. I am using BeautifulSoup4 to do so. I have successfully located the video URLs. 
  The issue I am facing is that I want to collect at least 2000 video links per category. But on one request, YouTube only displays 20 videos. How do I collect the URLs of more videos?</p>
  
  <pre><code>from bs4 import BeautifulSoup as bs
  import requests
  
  BASE_URL = "https://www.youtube.com"
  BASE_SEARCH_URL = "https://www.youtube.com/results?search_query="
  
  query = "travel+blogs"
  
  r = requests.get(BASE_SEARCH_URL + query)
  page = r.text
  soup = bs(page, 'html.parser')
  vids = soup.findAll('a', attrs={'class': 'yt-uix-tile-link yt-ui-ellipsis yt-ui-ellipsis-2 yt-uix-sessionlink spf-link '})
  
  video_urls = [BASE_URL + vid['href'] for vid in vids]
  
  print(video_urls)
  </code></pre>
  
  <p>The issue I am facing is that I want to collect at least 2000 video links per category. But on one request, YouTube only displays 20 videos. How do I collect the URLs of more videos?</p>