4Chan Grabber

Simple script for downloading imagethreads from popular 4chan.org.
Script tested on Linux and OSX. Leave a comment for errors in Windows.
You need to install needed imports if they are missing on your system.

Update v1.1
I have now added support for commandline arguments where you can give BOARD as a argument.
See updated usage description.

Description
Open 4chanGrabber.py with any texteditor and set your Board of choice.
Remember the trailing slash. Default is p/ for Photography.
You can still change in the .py file, or give board as argument.

BOARD = "p/"

The program will create a directory named files and create new directory for board, and thread names as directories within the board directory. If you change the board for your next run, a new directory will be created.

Run script with:

python 4chanGrabber.py board

Example

python 4chanGrabber.py /g

Scheduled downloads
Add script to crontab if you want to keep downloading 24/7.
This will run download every 15 minutes.

*/15 * * * * python /path/to/script/4chanGrabber.py /p

You can also see the source code by clicking here

3 thoughts on “4Chan Grabber

    • Hi,
      Thanks for the tip.

      I have added a new version 1.1 , where this is supported.
      Just add the board shortname ( /p etc) as a argument when running the script.

  1. I had to add a try statement around the urlretrieve part.
    Some images have a weird URL that i cannot extract.
    So the try block will drop them

Leave a Reply

Your email address will not be published. Required fields are marked *