Python - why don't this script work?
root at dev.nul.invalid
Tue Oct 23 06:50:27 CEST 2007
Adam Atlas <adam at atlas.st> wrote in news:1193108392.089611.91170
> I think you're executing it as a shell script. Run "python image-
> harvester.py", or add "#!/usr/bin/env python" to the top of the file.
Hey that is a cool idea, I think I will try it. I found out what is wrong
and did not get the results I want, I think the images are protected with
script. See my other post in this thread for details.
Shoot, the followup might have gone to alt.os.linux. I will repost for you
I figured it out, I have to run python I think first then the script and
the URL like this:
$ python image-harvester.py http://public.fotki.com/DaGennelman/
Now that actually seems to be doing something and it sure is busy now. It
is making a lot of little subdirectories in my test directory. I had to
copy image-harvester.py to the test directory first, then run python and
image-harvester.py w/URL and it is going to town. Tons of subfolders, so
far not images yet but it is not done. At least it is doing something now
and not bitching and hanging. I guess I had to call up python and pass it
to the script as the script does not seem to pull up python on it's own. So
far I have 60 directories and about 45 robots.txt but no jpg files yet. I
will let you know what happens. I think that these images are protected by
script, you never get a valid URL to the imgage file, just referrers, and
numbers and what not. When the image is finally displayed in your browser,
then you can save it but not until then. Pretty good way to stop a
harvester. Is this assumption pretty much correct or is there a way to make
this work? Now that I use python as the first command, I can run it in an
ssh window now and do not require an x-server.
Feel free to jump right in with your input on how this should or won't work
and what can be done to make it better. I have all of my scripts in a
$HOME/scripts/ directory and it is in my path but running this from another
directory does not work if image-harvester.py is not in the harvest
directory where I run the script from. I can right click on the image and
save it but the amazing script trips all over itself with these wacky file
name. I am all ears if someone figures it.
~Ohmster | ohmster /a/t/ ohmster dot com
Put "messageforohmster" in message body
(That is Message Body, not Subject!)
to pass my spam filter.
More information about the Python-list