donearm / pyimagedownloader Goto Github PK
View Code? Open in Web Editor NEWImage downloader from free image hostings in Python
License: GNU General Public License v3.0
Image downloader from free image hostings in Python
License: GNU General Public License v3.0
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:
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
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.
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/'.
On a systems with few ways to access the Internet (and the default one being limited/throttled/denied) sometimes the only way to reach webservers is to provide proxy server.
On a multihomed systems there might be desirable to provide interface name or, at least, IP address for process to bind to -- e.g. to let process to download galleries using slower but unmetered link.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.