I have the following code that pulls 60 seconds from the ESLCSGO twitch stream and downloads it to "output.mp4":
import streamlink, subprocess streams