Skip to content

Instantly share code, notes, and snippets.

@aidilfbk
aidilfbk / twitch_live_url.py
Last active May 2, 2024 02:37
Requesting special low latency m3u8 playlist file
import requests
import json
import re
import argparse
import random
import m3u8
USHER_API = 'https://usher.ttvnw.net/api/channel/hls/{channel}.m3u8?player=twitchweb' +\
'&token={token}&sig={sig}&allow_audio_only=true&allow_source=true&fast_bread=true' + \
'&type=any'