2022-05-29 10:19:09 +00:00
|
|
|
#!/bin/bash
|
2022-05-31 15:00:08 +00:00
|
|
|
|
|
|
|
#################################################
|
|
|
|
#
|
|
|
|
# IPTV Playlist download tool
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
# ./download-all.sh
|
|
|
|
#
|
|
|
|
# All playlists from playlists.ini will be
|
2022-06-08 00:57:53 +00:00
|
|
|
# downloaded in ./downloaded directory
|
2022-05-31 15:00:08 +00:00
|
|
|
#
|
2022-06-09 03:51:25 +00:00
|
|
|
# Anthony Axenov (c) 2022
|
|
|
|
# The MIT License:
|
|
|
|
# https://github.com/anthonyaxenov/iptv/blob/master/LICENSE
|
|
|
|
#
|
2022-05-31 15:00:08 +00:00
|
|
|
#################################################
|
|
|
|
|
2022-10-22 08:45:58 +00:00
|
|
|
TOOLS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
|
|
|
|
DL_DIR="$TOOLS_DIR/downloaded"
|
2022-10-22 14:44:05 +00:00
|
|
|
INI_FILE="$(dirname "$TOOLS_DIR")/playlists.ini"
|
2022-10-22 08:45:58 +00:00
|
|
|
|
|
|
|
rm -rf "$DL_DIR" && \
|
|
|
|
mkdir -p "$DL_DIR" && \
|
|
|
|
cd "$DL_DIR" && \
|
2022-10-22 14:44:05 +00:00
|
|
|
cat "$INI_FILE" \
|
2022-10-22 08:45:58 +00:00
|
|
|
| grep -P "pls\s*=\s*'(.*)'" \
|
|
|
|
| sed "s#^pls\s*=\s*##g" \
|
|
|
|
| sed "s#'##g" \
|
|
|
|
| tr -d '\r' \
|
|
|
|
| xargs wget
|