title: How to stop youtube-dl download inside a thread using Python 3
body: <p>I have a function that downloads videos from specific URLs and I launch this function through a thread to avoid GUI freezing, but I want a function to stop or pause the download. How to do this?
  Here is the code:</p>
  <pre><code>def download_videos(self):
       ydl1 = youtube_dl.YoutubeDL(self.get_opts())
       if self.get_Urls().__len__() &gt; 0:
           ydl1.download(self.get_Urls())
  
  def downloadVideoThrd(self):
      self.t1 = threading.Thread(target=self.download_videos())
      self.t1.start()
  </code></pre>