Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Downloads all the images from a given thread at 4Chan. Easily extendible to download from other boards.

Notifications You must be signed in to change notification settings

jasperbok/4chan-image-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

------------------------------------------------------------------------------
			                BROKEN AND NO LONGER MAINTAINED
------------------------------------------------------------------------------

          		   Since this script was written 4chan added
		               some bot protection to their site.

          		    Therefore, this script does not work in
			                     its current state.

          		    I haven't visited 4chan in a looong time
          		     and therefore have little interest in
                     				  fixing this.

           		  Sorry about that, but feel free to fork! :)

------------------------------------------------------------------------------
                                  What is it?
------------------------------------------------------------------------------

A Python application that runs from a commandline interface that downloads all
the images from a specific image board thread for you.

It's easily extendible to use for other message boards. See the 'Extending'
section in this readme to see how that works.


------------------------------------------------------------------------------
                                 Requirements
------------------------------------------------------------------------------

- Python 2.7 (other Python versions might work, but this is the one I used to
  create and test the program).


------------------------------------------------------------------------------
                                  How to Use
------------------------------------------------------------------------------

Simply place whole program somewhere and navigate to the chosen location from
your commandline. From there, start the program using the command
'python download_images.py'. From there on, the application explains itself.


------------------------------------------------------------------------------
                                  Extending
------------------------------------------------------------------------------

If you want to support additional message boards, you simply add an entry for
every board you want to support to the boards.txt file.

All board entries should be seperated by an empty line and the last board
entry should be followed by an empty line as well.

A board entry consists of 4 lines, each line representing a variable. These
are:

name
regular expressions to find images in a html page
base image url
thread url format

Name:       The name of the board. This variable is used in presenting the
            websites a user can choose. It is also used as the name of the
            top-level directory in which all images from this board will be
            stored.
Regular     A regular expression for finding the images in a tread. This
expression  expression should match the whole part of the image URL after
            the top-level domain (such as .com or .org). So for the URL
            http://images.4chan.org/g/src/1231432.png it should match
            everything (including the '/') after the .org part.
Base image  This is the part of the image url that is not matched by the
URL         above regular expression.
Thread URL  The format of a URL to a thread. You should use the {board} and
format      {thread} variables here so these can be replaced by the values
            representing these variables.

If you would like examples of how to do this, please check out the existing
4chan and 7chan entries that are in boards.txt by default. Just remember to
put a blank line after every board entry, even if it's the last entry.

About

Downloads all the images from a given thread at 4Chan. Easily extendible to download from other boards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages