title: How can i scroll down youtube videos using requests
body: <p>The following sections of my code work but the problem here is it only gets the names of the videos in the visible part of the page. What I want to do is to scroll down through the page. Is there a way to scroll down using requests module in python??</p>
  
  <pre><code>    def __init__(self):
      word = input("Search: ")
      self.r = requests.get('https://www.youtube.com/results?search_query={}'.format(word))
      self.soup = BeautifulSoup(self.r.content,"html.parser")
  
  def find_video(self):
      videos = self.soup.find('div',attrs={"id":"content"}).find_all("div",attrs={"class":"yt-lockup-content"})
      for video in videos:
          user_detector = video.a.get("href")
          if user_detector.startswith("/watch"):
              print(video.a.text)
              print("------------------------------------")
          else:
              pass
  </code></pre>