Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

An asynchronous image/file downloader and thread archiver for Futaba-styled imageboards, such as 4chan and 8chan.

Project Description
![Chandere2](https://raw.github.com/TsarFox/chandere2/master/Chandere2_Logo.png "Chandere2")
========
## A command-line utility programmed and maintained by [Jakob.](http://tsar-fox.com/)
An asynchronous image downloader and thread archiver for Futaba-styled imageboards, such as 4chan and 8chan.

Chandere2 is a complete rewrite of Chandere using asynchronous concurrency. Its goals are to be fast and as universal as possible.

Chandere2 is free software, licensed under the [GNU General Public License.](http://gnu.org/licenses/gpl.html)

[![Build Status](https://travis-ci.org/TsarFox/chandere2.svg?branch=master)](https://travis-ci.org/TsarFox/chandere2) [![PyPI Version](https://img.shields.io/pypi/v/Chandere2.svg)](https://pypi.python.org/pypi/Chandere2/) [![AUR Version](https://img.shields.io/aur/version/chandere2.svg)](https://aur.archlinux.org/packages/chandere2/) [![License](https://img.shields.io/github/license/tsarfox/chandere2.svg)](https://www.gnu.org/licenses/gpl.html)


Primary Features
----------------

* Several boards and threads can be scraped from simutaneously.
* Archives to many formats, including plaintext and SQL.
* A simple but powerful interface for filtering posts, with support for wildcard syntax and regular expressions.
* Countless imageboards are supported out of the box. New support is added nearly every update.


Installation
------------

**Arch Linux** users are able to install Chandere2 using Pacman. It is packaged in the [AUR.](https://aur.archlinux.org/packages/chandere2/)

$ makepkg -si

If you are running a distribution for which Chandere2 is not packaged, or are not running Linux, the most reliable way to install Chandere2 is through Pip.

$ # It is recommended that you use the latest version of pip and setuptools when installing Chandere2.
# pip install --upgrade pip setuptools
# pip install --upgrade chandere2

Alternatively, setup.py in the repository's root directory can be used. This is not recommended.

# python setup.py install

If Chandere2 is installed with Pip or setup.py, you will have to manually move the manpages to your manpath.

$ make doc
# cp docs/*.1.gz /usr/share/man/man1 # The destination path may be different on your system.


Tutorial
--------

Chandere2 has several mode of operations. When no particular mode is specified, the default is to try to connect to the specified targets and print the response headers.

$ chandere2 /g/
CONNECTED: a.4cdn.org/g/threads.json
...

More than one target can be specified, as well.

$ chandere2 /g/ /3
...

Targets can also refer to a thread, rather than an entire board if a thread ID is appended to the board initial.

$ chandere2 /g/51971506

Now with the basics of specifying targets, we can get into more useful modes of operation. To download every file in a board or thread, use the "-d" or "--download" argument.

$ chandere2 /g/51971506 -d
...

That will download everything into the current working directory, though, which is often not desired. The output path with the "-o" or "--output" parameter.

$ chandere2 /g/51971506 -d -o Stallman

All of these examples will scrape from 4chan. An alternate imageboard can be specified with "-i". Available imageboard aliases are listed when Chandere2 is run with "--list-imageboards".

$ chandere2 --list-imageboards
Available Imageboard Aliases: lainchan, 4chan
$ chandere2 /cyb/ -d -o Cyberpunk -i lainchan

Post filtering is by far the least intuitive feature to use, though it should feel somewhat familiar to anyone who has used 4chan's built in filtering system. Rather than being limited to five post fields, any field in the json output can be filtered. The following example will only download WEBM and MP4 videos, and will ignore files with the MD5 checksum of "Q0GnSJ3ej7ikA3dfYiXJMA==".

$ chandere2 /gif/9463458 -d --filter ext:/[!(.webm)(.mp4)]/ md5:Q0GnSJ3ej7ikA3dfYiXJMA==

While filter patterns can be as simple as the md5sum in the example above, there are several features to make filtering more useful. When several words or phrases are joined with spaces, the filtering engine will check to see if the pattern occurs in any order. Double quotes can be used to force the order of a match; for example, '--filter com:"that feel when"' will not filter "when that feel" in a comment body. Regular expressions can be used as long as the regexp is enclosed in forward slashes.


TODO
----
[TODO](/TODO.md)
Release History

Release History

This version
History Node

2.4.1

History Node

2.4.0

History Node

2.3.1.post1

History Node

2.3.1

History Node

2.3.0

History Node

2.2.0

History Node

2.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Chandere2-2.4.1-py3-none-any.whl (21.3 kB) Copy SHA256 Checksum SHA256 3.6 Wheel Jun 22, 2017
Chandere2-2.4.1.tar.gz (29.4 kB) Copy SHA256 Checksum SHA256 Source Jun 22, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting