Created
September 28, 2023 21:54
-
-
Save CardealRusso/4cc9df2030c341d9090853a0f15d71ba to your computer and use it in GitHub Desktop.
simple 4chan webm downloader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url_parts=$(echo "$1" | sed 's/.*\/\([^/]*\)\/thread\/\([0-9]*\)\/.*/\1 \2/') | |
board=$(echo "$url_parts" | cut -d ' ' -f 1) | |
thread=$(echo "$url_parts" | cut -d ' ' -f 2) | |
curl -s "https://a.4cdn.org/$board/thread/$thread.json" | jq -r '.posts[] | select(.ext==".webm") | "https://is2.4chan.org/'"$board"'/\(.tim).webm"' | xargs -n 1 -P 5 curl -O |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment