If you have stream freezing issues you may need to connect via a vpn.

Same here on my Solo2!

Where exactly? That just points to a repo. We need to see how to grab the session token and use it.https://github.com/kineticman/pluto-for-channels describes a fix/workaround... however, i can't assess whether it works or not.
session = requests.Session() ... ???Where exactly? That just points to a repo. We need to see how to grab the session token and use it.
So where is the token returned by the server?session = requests.Session() ... ???
import requests
import uuid
PLUTO_BOOT_URL = "https://boot.pluto.tv/v4/start"
PLUTO_API_URL = "https://api.pluto.tv/v3"
DEVICE_ID = uuid.uuid4().hex
HEADERS = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"}
def getSessionToken():
params = {
"appName": "web",
"appVersion": "9.9.0",
"deviceVersion": "100",
"deviceId": DEVICE_ID,
"deviceType": "web",
"deviceMake": "Firefox",
"deviceModel": "web",
"deviceDNT": 0,
"channelSlug": "",
"clientID": DEVICE_ID,
"clientModelNumber": "1.0.0",
}
try:
response = requests.get(PLUTO_BOOT_URL, params=params, headers=HEADERS, timeout=5)
response.raise_for_status()
return response.json().get("sessionToken", "")
except Exception:
return ""
def getURL(url, param=None):
try:
print("[getURL] url", url)
req = requests.get(url, params=param, headers=HEADERS, timeout=5)
req.raise_for_status()
response = req.json()
req.close()
return response
except Exception:
return {}
# Usage
session_token = getSessionToken()
if session_token:
vod = getURL(f"{PLUTO_API_URL}/vod/categories", {
"includeItems": "true",
"deviceType": "web",
"sid": session_token,
"deviceId": DEVICE_ID,
})