Add download chapters script
This commit is contained in:
31
download_chapters.sh
Normal file
31
download_chapters.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Default values
|
||||
FORMAT="cbz"
|
||||
DELAY_MS=2000
|
||||
URL="https://www.webtoons.com/en/fantasy/tower-of-god/list?title_no=95"
|
||||
|
||||
# Usage message
|
||||
usage() {
|
||||
echo "Usage: $0 [-f format] [-d delay_ms] [-u url]"
|
||||
echo " -f Output format (default: cbz)"
|
||||
echo " -d Delay in milliseconds between episodes (default: 2000)"
|
||||
echo " -u Webtoon URL"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Parse CLI arguments
|
||||
while getopts ":f:d:u:" opt; do
|
||||
case ${opt} in
|
||||
f) FORMAT=$OPTARG ;;
|
||||
d) DELAY_MS=$OPTARG ;;
|
||||
u) URL=$OPTARG ;;
|
||||
\?) usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Execute the command
|
||||
webtoon-dl \
|
||||
--format "$FORMAT" \
|
||||
--delay-ms="$DELAY_MS" \
|
||||
"$URL"
|
||||
Reference in New Issue
Block a user