Skip to content

Instantly share code, notes, and snippets.

@CardealRusso
Created September 28, 2023 21:54
Show Gist options
  • Save CardealRusso/4cc9df2030c341d9090853a0f15d71ba to your computer and use it in GitHub Desktop.
Save CardealRusso/4cc9df2030c341d9090853a0f15d71ba to your computer and use it in GitHub Desktop.
simple 4chan webm downloader
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