#!/bin/bash

#tvp hd - 72827367
#tvp seriale - 72827372
json=$(curl "https://api.tvp.pl/tokenizer/token/$1")

url=$(jq -r -n --argjson data "$json" '$data.url')

streamlink -O "$url" best


