denex/hls-downloader

Renaming "-" in chunk to "_" cause 404 to all chunks

amotzte opened this issue · 4 comments

Reproduce with

python main.py -v  https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8 ./
denex commented

Fixed

Fixed

C:\Users\shahi\Desktop\hls-downloader-master>python main.py -v https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8?s=GNRxCLRXueTW8gbQPyzqrg&t=1577000338 ./
usage: main.py [-h] [-v] url_to_m3u8 download_dir
main.py: error: too few arguments
't' is not recognized as an internal or external command,
operable program or batch file.

denex commented

python main.py -v https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8?s=GNRxCLRXueTW8gbQPyzqrg&t=1577000338 ./

It's shell-specific issue. Shell treats symbols like ?, $, = as special.

Either escape ? and & chars with \ like this:

python main.py -v https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8\?s\=GNRxCLRXueTW8gbQPyzqrg\&t\=1577000338 ./

Or use ' for whole URL like this:

python main.py -v 'https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8?s=GNRxCLRXueTW8gbQPyzqrg&t=1577000338' ./
```shell
python main.py -v https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8\?s\=GNRxCLRXueTW8gbQPyzqrg\&t\=1577000338 ./

python main.py -v https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8\?s\=GNRxCLRXueTW8gbQPyzqrg\&t\=1577000338 ./
usage: main.py [-h] [-v] url_to_m3u8 download_dir
main.py: error: too few arguments
't' is not recognized as an internal or external command,
operable program or batch file.

python main.py -v 'https://cdn1live.irib.ir/live-channels/smil:nasim/playlist.m3u8?s=GNRxCLRXueTW8gbQPyzqrg&t=1577000338' ./
usage: main.py [-h] [-v] url_to_m3u8 download_dir
main.py: error: too few arguments
't' is not recognized as an internal or external command,
operable program or batch file.