title: HTTP error 403 Forbidden error with streamlink and ffmpeg python
body: <p>I am currently trying to save the video of a live stream on the disk using the link to the m3u8 file, passing it to streamlink and then converting everything to ffmpeg, but when the streamer disconnects or the connection drops I get this error</p>
  
  <pre><code>HTTP error 403 Forbidden
  Failed to reload playlist 0
  </code></pre>
  
  <p>and the program never ends, never reach the command line to convert the mkv video in mp4. How can I catch the exception and ignore it?</p>
  
  <p>This is my code</p>
  
  <pre><code>url = 'url.m3u8'
  
  stream_url = streamlink.streams(url)['worst'].url
  ffmpeg_process = Popen(["path-to-ffmpeg.exe", "-i",
           stream_url, "-c", "copy", 'file.mkv'])
  
  #to keep main.py alive
  while True:
      #check if process ffmpeg still alive, if not break
  
  #never reched
  cmds = ['path-to-ffmpeg',
          '-i', 'file.mkv', 'file.mp4']
  subprocess.Popen(cmds).wait()
  </code></pre>