Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import requests
- import subprocess
- width = 640
- height = 360
- x = 1250
- y = 400
- mpvArgs = "--ytdl --force-window=immediate --cache-pause-initial=yes --no-terminal --no-keepaspect --ontop --title=Cell --script-opts=osc-title=Cell"
- if __name__ == "__main__":
- response = requests.get("https://flowstreams.pw/api/streams/975")
- try:
- playlist = "/" + response.json()["data"]["m3u8"].split("/")[-1]
- except JSONDecodeError:
- print("failed to serialise flowstreams api response")
- geometry = " --geometry="+str(width)+"x"+str(height)+"+"+str(x)+"+"+str(y)
- url = "https://cdn.flowstreams.pw/fishtank-cell" + playlist
- subprocess.run(
- "mpv "+ url +' --http-header-fields="Referer: https://flowstreams.pw/, Origin: https://flowstreams.pw" '+ mpvArgs + geometry
- )
Advertisement