aria2c -i ts_links.txt --user-agent="Mozilla/5.0..." --header="Authorization: Bearer TOKEN" --header="Cookie: name=value" Use code with caution. Dealing with Encrypted Streams
However, as this manual process can be quite complex, it's highly recommended to use a dedicated tool like yt-dlp or dlm3u8 that can automate the entire process from start to finish. aria2c m3u8