The file in question looks like this:
https://example.com/somenumbers/somenumbers/somename.ts.m3u8
The file in question isn't a live stream. It's a recording.
I've tried using the ffmpeg library using various commands but the resulting file was either not downloaded at all due to "corrupted" error, or was downloaded but was heavily corrupted.