Skip to content
Python script to archive all images/videos of a 4chan thread
Python
Branch: master
Clone or download
This branch is 50 commits ahead of Exceen:master.

Latest commit

HelpSeeker Store archive hashes as set
Using a list in this case is just inefficient, since we only check for
the existence of hashes.
Latest commit 030c6bc Mar 3, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Update .gitignore Jul 23, 2018
LICENSE Update LICENSE Jul 18, 2018
README.md Update README.md Jan 5, 2020
inb4404.py Store archive hashes as set Mar 3, 2020

README.md

A4A

A4A (Asyncio 4chan Archiver or Asyncio 4 Archiving, depending on how much the reader cares about the 4chan API ToS) is a Python script to download all images/videos of a 4chan thread.

Usage

usage: inb4404.py [-h] [-f] [-p PATH] [-a FILE] [--connections N]
                  [--retries N]
                  thread [thread ...]

A4A is a Python script to download all files from 4chan(nel) threads.

positional arguments:
  thread                url of the thread

optional arguments:
  -h, --help            show this help message and exit
  -f, --filenames       use original filenames instead of UNIX timestamps
  -p, --path PATH       set output directory (def: <script location>/downloads)
  -a, --archive FILE    keep track of downloaded files by logging MD5 hashes
  --connections N       number of connections to use (def: 10)
  --retries N           how often to retry a thread if errors occur (def: 5)
                          N<0 to retry indefinitely (not recommended)

Requirements

Paths

The final output directory is assembled according to the following structure

<base path>/<board>/<directory name>

<base path> and <directory name> are variable components, which can be changed by the user.

  • <base path> can be changed with -p/--path (defaults to <path to inb4404.py>/downloads)
  • <directory name> can be set by adding the desired name to the thread link separated by another "/" (defaults to thread number)

For example:

https://boards.4channel.org/abc/thread/12345678        -> <path to inb4404.py>/downloads/abc/12345678
https://boards.4channel.org/abc/thread/12345678/my_dir -> <path to inb4404.py>/downloads/abc/my_dir
You can’t perform that action at this time.