Fix query to fetch HD qualities

This commit is contained in:
Ivan Habunek 2024-08-30 11:43:48 +02:00
parent ac7cdba28e
commit cfefae1e69
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C

View File

@ -3,6 +3,7 @@ Twitch API access.
"""
import logging
import random
import time
from typing import Any, Dict, Generator, List, Mapping, Optional, Tuple, Union
@ -391,8 +392,12 @@ def get_playlists(video_id: str, access_token: AccessToken) -> str:
"allow_audio_only": "true",
"allow_source": "true",
"player": "twitchweb",
"platform": "web",
"supported_codecs": "av1,h265,h264",
"p": random.randint(1000000, 10000000),
},
)
response.raise_for_status()
return response.content.decode("utf-8")