What's up fellow data-hoarders
I made an interactive Jow Forums image downloading script.
You give it the thread url and it asks you where you want to make a specific subfolder, I would go with g/traps or g/faggotry.
It'll even check if the folder exists before making it so that you don't have duplicates!
I want to make one for sites like e-hentai and nhentai so I can have an easy way of saving doujins but I don't even know where to start with those.
Any anons willing to help out with wget would be much obliged
I know there's big programs that download things for you but a script can be mapped to a keybind, can be combined with other scripts, can run headless, and can run on even the shittiest toaster, so there is merit to this.
#!/bin/bash
#use --limit-rate=Xk to limit bandwidth hogging
echo "Where to save images in 4shit folder?"
read dir
#use test to see if the parent directory is there or not
if [ ! -e /home/user/.wget/image/Jow Forums/$dir ]
then
echo "Directory doesn't exist, make it? [n/y]"
read answer
if [ $answer != 'y' ]
then
exit
fi
else
mkdir -p /home/user/.wget/image/Jow Forums/$dir
fi
#no -nH since the user will be picking the subdirectory rather than having wget lump all board images together. -nh will group images with a seperate directory per board name though, if you want to make this a non-interactive script.
spot=/home/user/.wget/image/Jow Forums/$dir
wget -P $spot\
-nd -c --exclude-directories="boards.Jow Forums.org/*/thread/"\
-r -l 1 -H -N\
--secure-protocol=auto --https-only\
-e robots=off -ER html,s.jpg\
-D i.4cdn.org -A png,gif,jpg,jpeg,webm $1
echo "Thread $1 Downloaded"