Guest User

Untitled

a guest
Jul 15th, 2024
92
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. import json
  2. import requests
  3. import subprocess
  4.  
  5. width = 640
  6. height = 360
  7. x = 1250
  8. y = 400
  9.  
  10. mpvArgs = "--ytdl --force-window=immediate --cache-pause-initial=yes --no-terminal --no-keepaspect --ontop --title=Cell --script-opts=osc-title=Cell"
  11.  
  12. if __name__ == "__main__":
  13. response = requests.get("https://flowstreams.pw/api/streams/975")
  14. try:
  15. playlist = "/" + response.json()["data"]["m3u8"].split("/")[-1]
  16. except JSONDecodeError:
  17. print("failed to serialise flowstreams api response")
  18. geometry = " --geometry="+str(width)+"x"+str(height)+"+"+str(x)+"+"+str(y)
  19. url = "https://cdn.flowstreams.pw/fishtank-cell" + playlist
  20. subprocess.run(
  21. "mpv "+ url +' --http-header-fields="Referer: https://flowstreams.pw/, Origin: https://flowstreams.pw" '+ mpvArgs + geometry
  22. )
Advertisement
Comments
Add Comment
Please, Sign In to add comment