Code Monkey home page Code Monkey logo

pyimagedownloader's Introduction

Purpose of this program

PyImagedownloader is an image downloader written in Python. It downloads all the images hosted on the supported imagehosting sites (see Supported Host List) present on the given url and puts them all in a directory with the page title name. It's geared towards those people that download images to share them afterwards on their blogs or on forums. It automatically saves the link of the page with the images as a source to cite the original poster or can optionally save the name of the person to whom give credit to in a separate file.

It also downloads images posted in one of the supported forum or sites (see Supported Forum/Sites List) given that you have a valid login (user

  • password) and put it in the config file (pyimg.py). Those supported are just what I regularly use, more could be added.

Note

Given to time, or lack thereof to be correct, being not aplenty on my part, this software won't receive new features or correct its, many, defects (like GUIs being very buggy or totally not working). I'll be updating it in accord to changes from image hostings as soon as I can but probably no new hostings will be added. I just not have the time and will to refactor all this to make it "modern" (and it would dearly need it, I know) nor to make it more stable. Therefore, if anybody wants to help or fork it I'm very willing to collaborate. Patches are very welcome too.

Installation

Most of the time a simple python build/setup.py install should suffice. See http://docs.python.org/install/index.html

License

see COPYING

Supported Host List

  • Blogspot.com
  • Bellazon.com (only with a valid login)
  • Imagebam.com
  • Imageban.ru
  • Imageboss.com
  • Imagehaven.com
  • Imagehost.org
  • Imageshack.us
  • Imagetitan.com
  • Imageupper.com
  • Imagevenue.com
  • Imgbox.com
  • Imgchili.com
  • Imgur.com
  • Photobucket.com
  • Pixroute.com
  • Postimage.org
  • Radikal.ru
  • Servimg.com
  • Shareapic.net
  • Sharenxs.com
  • Skins.be
  • Storeimgs.com
  • Turboimagehost.com
  • Tumblr.com
  • Typepad.com
  • Usemycomputer.com
  • Wordpress.com

Supported Forum/Sites List

pyimagedownloader's People

Contributors

donearm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyimagedownloader's Issues

AttributeError: Connector instance has no attribute 'logger'

After fixing few random issues and preparing host-readable config file I decided to try it with random URL. Unfortunately it failed beyond my understanding:

$ /usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/pyimagedownloader.pyc http://imgchili.net/album/...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/pyimagedownloader.py", line 428, in
download_url(url, basedir, options.embed, options.poster)
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/pyimagedownloader.py", line 312, in download_url
connector = http_connector.Connector()
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/http_connector.py", line 52, in init
self.opener = self.threadsafe_opener()
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/http_connector.py", line 60, in threadsafe_opener
self.logger.setLevel(logging.DEBUG)
AttributeError: Connector instance has no attribute 'logger'

Exactly the same with generic URL, e.g. ' http://ifconfig.me/'.

ImportError: No module named pyimg

Thank you for great contribution and futher inspiration, although I have to admit I didn't manage to run this software, probably because I'm very inexperienced python user.

python setup.py install ended without apparent problems:

byte-compiling build/bdist.linux-i686/egg/pyimagedownloader/bellazon.py to bellazon.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying PyImagedownloader.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying PyImagedownloader.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying PyImagedownloader.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying PyImagedownloader.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying PyImagedownloader.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
pyimagedownloader.runtests: module references file
creating 'dist/PyImagedownloader-1.6-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing PyImagedownloader-1.6-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg
Extracting PyImagedownloader-1.6-py2.7.egg to /usr/local/lib/python2.7/dist-packages
PyImagedownloader 1.6 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg
Processing dependencies for PyImagedownloader==1.6
Searching for lxml==3.5.0b1
Best match: lxml 3.5.0b1
Processing lxml-3.5.0b1-py2.7-linux-i686.egg
lxml 3.5.0b1 is already the active version in easy-install.pth

Checking /usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/ shows a list of files (all installed with very bad permissions and file ownership, but I think it's setup's.py issue) so after fixing it alltogether I've got:

running_as_user_or_root$ /usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/pyimagedownloader.pyc
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/pyimagedownloader.py", line 38, in
import savesource, imageshack, imagevenue, imagehaven, imagebam,
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/imageshack.py", line 26, in
from pyimg import user_agent
ImportError: No module named pyimg

So I've checked this file and I see:

importing config file variables

from pyimg import basedir, numprocs, debug, logfile, logmaxsize

According to Google: "No results found for python +pyimg"

Given the mention in readme:
It also downloads images posted in one of the supported forum or sites
(see Supported Forum/Sites List) given that you have a valid login (user

  • password) and put it in the config file (pyimg.py). Those supported
    are just what I regularly use, more could be added.

and .gitignore:
pyimg.py*

I think you could provide some kind of pyimg-py.dist showing HOW those values should be set (I mean, to provide examples) and, better, to use ~/.some_dotfile style to keep configuration (and create initial one on themselves)...

...because fixing every single thing like this spoils all fun:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/pyimagedownloader.py", line 428, in
download_url(url, basedir, options.embed, options.poster)
File "/usr/local/lib/python2.7/dist-packages/PyImagedownloader-1.6-py2.7.egg/pyimagedownloader/pyimagedownloader.py", line 310, in download_url
logger.info("Downloading from %s" % url[0])
IndexError: list index out of range

Etc.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.