You are not logged in.

#26 2009-04-24 02:34:54

elmer_42
Member
From: /na/usa/ca
Registered: 2008-10-11
Posts: 427

Re: ImageShack Uploader Script

lolilolicon wrote:

doesn't work anymore, donno why hmm, any one can help fix it ?

Yeah, dhp1080 updated kimages. I'll start working to fix it now, I should have something soon.


[ lamy + pilot ] [ arch64 | wmii ] [ ati + amd ]

Offline

#27 2009-04-24 02:40:58

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: ImageShack Uploader Script

elmer_42 wrote:

Yeah, dhp1080 updated kimages. I'll start working to fix it now, I should have something soon.

Nice!
I just have no clue... waiting for your hand big_smile


This silver ladybug at line 28...

Offline

#28 2009-04-24 03:16:00

elmer_42
Member
From: /na/usa/ca
Registered: 2008-10-11
Posts: 427

Re: ImageShack Uploader Script

Here's the updated version. It's no longer a single line due to a change in the way kimag.es gives you the location of your image, but I actually like it better this way; you can see the helpful page with pre-made BBCode and HTML this way.
Usage: `kup.sh image.ext`

curl -# -F userfile1=@$1 -D kimagtemp http://kimag.es/upload.php
echo -n "http://kimag.es"
cat kimagtemp|grep /view.php?i=|cut -c11-34
rm kimagtemp

[ lamy + pilot ] [ arch64 | wmii ] [ ati + amd ]

Offline

#29 2009-04-24 03:29:06

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: ImageShack Uploader Script

OOh! sweet..

the -D option , didn't know a thing about it

thanks, elmer_42 !


This silver ladybug at line 28...

Offline

#30 2009-04-24 04:17:09

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: ImageShack Uploader Script

Hey, elmer_42, how about this one::

http://tinypic.com


This silver ladybug at line 28...

Offline

#31 2009-04-24 05:56:09

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: ImageShack Uploader Script

elmer_42 wrote:

Here's the updated version. It's no longer a single line due to a change in the way kimag.es gives you the location of your image, but I actually like it better this way; you can see the helpful page with pre-made BBCode and HTML this way.
Usage: `kup.sh image.ext`

curl -# -F userfile1=@$1 -D kimagtemp http://kimag.es/upload.php
echo -n "http://kimag.es"
cat kimagtemp|grep /view.php?i=|cut -c11-34
rm kimagtemp

I used one line to fix it for myself, but it is a lot uglier:

curl -# -F userfile1=@$1 http://kimag.es/upload.php?action=upload && curl -# http://kimag.es/allimg.php | grep http://arch.kimag.es/share|cut -d '"' -f8

Last edited by Zeist (2009-04-24 05:59:41)


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#32 2009-04-24 06:24:55

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: ImageShack Uploader Script

GOod aproach , Zeist

you used "Recent Uploads" , right?

That's just enough for it , bravo


This silver ladybug at line 28...

Offline

#33 2009-04-24 07:00:33

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: ImageShack Uploader Script

I have signed an account there at kimag.es , and i get my album page like::

http://albums.kimag.es/user/myname

i think here it's just ok to use the old script ... only i don't know how to pass the password or "cookie" through curl... hmm

if it is done, it'll be better since with an account the images are safer in your hand.. should be simple... Help

Last edited by lolilolicon (2009-04-24 07:00:53)


This silver ladybug at line 28...

Offline

#34 2009-04-24 13:21:29

elmer_42
Member
From: /na/usa/ca
Registered: 2008-10-11
Posts: 427

Re: ImageShack Uploader Script

Zeist wrote:

I used one line to fix it for myself, but it is a lot uglier:

curl -# -F userfile1=@$1 http://kimag.es/upload.php?action=upload && curl -# http://kimag.es/allimg.php | grep http://arch.kimag.es/share|cut -d '"' -f8

Eh, I personally don't care if it's ugly or not; this stuff will be hidden away in my .bashrc anyway. Interesting way to solve the problem. If I hadn't asked dhp (who says IRC isn't useful?) for help, I would have probably ended up doing something very similar to you.


[ lamy + pilot ] [ arch64 | wmii ] [ ati + amd ]

Offline

#35 2009-11-09 23:22:10

novito
Member
Registered: 2009-11-09
Posts: 4

Re: ImageShack Uploader Script

Hi,

So I've been trying this script because I want to upload 1700 images which are in a folder, but I get an error, and I don't know why. 
I execute the script by typing:

python scriptupload.py all jpg.  And it says:

Traceback (most recent call last):
  File "upload.py", line 58, in <module>
    uploadall(ext)
  File "upload.py", line 39, in uploadall
    file = open(tmp, "r")
IOError: [Errno 2] No such file or directory: 'temp.data'


The temporary file has to be created? I have done it and it still not working. Some suggestions?

Thank you

Offline

#36 2009-11-09 23:30:49

novito
Member
Registered: 2009-11-09
Posts: 4

Re: ImageShack Uploader Script

I forgot to say that the console also says:

sh: gt: command not found
sh: temp.data: command not found

Offline

#37 2009-11-09 23:52:01

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Re: ImageShack Uploader Script

novito wrote:

Hi,

So I've been trying this script because I want to upload 1700 images which are in a folder, but I get an error, and I don't know why. 
I execute the script by typing:

python scriptupload.py all jpg.  And it says:

Traceback (most recent call last):
  File "upload.py", line 58, in <module>
    uploadall(ext)
  File "upload.py", line 39, in uploadall
    file = open(tmp, "r")
IOError: [Errno 2] No such file or directory: 'temp.data'


The temporary file has to be created? I have done it and it still not working. Some suggestions?

Thank you

Oh, I see what happened. The forum is displaying the < and > characters as html codes. In the code, simply replace all occurances of < with a <, and replace > with a >.

Offline

#38 2009-11-09 23:53:41

solarwind
Member
From: Toronto
Registered: 2008-03-18
Posts: 546

Re: ImageShack Uploader Script

novito wrote:

Hi,

So I've been trying this script because I want to upload 1700 images which are in a folder, but I get an error, and I don't know why. 
I execute the script by typing:

python scriptupload.py all jpg.  And it says:

Traceback (most recent call last):
  File "upload.py", line 58, in <module>
    uploadall(ext)
  File "upload.py", line 39, in uploadall
    file = open(tmp, "r")
IOError: [Errno 2] No such file or directory: 'temp.data'


The temporary file has to be created? I have done it and it still not working. Some suggestions?

Thank you

Also, for uploading 1700 files, this script should work, but if for some reason encounters an error in the middle, you'd need to find the last file that was uploaded or something, and start again from there. It's a very simple script, it's not meant to handle errors and stuff like that.

Also, Imageshack may have changed the way that files are uploaded, and the output page is displayed, so this script may not work and may need updating.

Last edited by solarwind (2009-11-09 23:55:42)

Offline

#39 2009-11-10 00:44:28

novito
Member
Registered: 2009-11-09
Posts: 4

Re: ImageShack Uploader Script

Thanks a lot buddy,

I will try it again smile

Offline

#40 2009-11-10 00:52:26

novito
Member
Registered: 2009-11-09
Posts: 4

Re: ImageShack Uploader Script

I think that wasn't the error because now the error is:

dhcp-125-167:feret_gender JoanRoig$ python upload.py all jpg
Uploading: *.jpg
Uploading: 00100fa.p.01_0.jpg
sh: -c: line 0: syntax error near unexpected token `;'
sh: -c: line 0: `curl -H Expect: -F fileupload="@00100fa.p.01_0.jpg" -F xml=yes -# "http://www.imageshack.us/index.php" >; temp.data'
Traceback (most recent call last):
  File "upload.py", line 58, in <module>
    uploadall(ext)
  File "upload.py", line 39, in uploadall
    file = open(tmp, "r")
IOError: [Errno 2] No such file or directory: 'temp.data'


Mmmmm, regarding to the temp.data, do I have to create this file before launching the script?  It has to have something inside?

Offline

Board footer

Powered by FluxBB