Skip to content

Instantly share code, notes, and snippets.

@usure
Last active October 12, 2015 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usure/4012495 to your computer and use it in GitHub Desktop.
Save usure/4012495 to your computer and use it in GitHub Desktop.
4chan thread archiver (UPDATED)
#!/bin/bash
[[ $1 =~ .*org* ]] && \
#thread=`echo $1 | cut -c25-`
thread=`echo $1 | sed "s/4chan.org//g" | sed "s/[^0-9]//g;s/^$/-1/;"`
echo $thread
echo "BOARD?"
read board
cd $board
mkdir $thread
cd $thread
while :
do
wget -e robots=off -E -nd -nc -np -r -k -H -D i.4cdn.org,i.4cdn.org $1
cp $thread.html index.html
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment