Jump to content
UBot Underground

Saving different image type (PLEASE HELP!!!)


Recommended Posts

This has been giving me trouble for a while. I tried to just let it slide, but it's becoming more and more of an issue.

 

So our clients upload images (photos and logos) of their businesses into our system for us to use in their campaigns.

 

Our system then spits out a spreadsheet that contains one or more of the urls to the images. I want to be able to use ubot to download the images and then upload them to various websites when necessary.

 

The problem I am facing is this....

 

1. The urls are always different depending on which client we are working on.

2. The urls are different depending on whther the image is a logo or a photo.

3. the file types are always different depending on what the client uploaded. (jpg, jpeg, gif, png)

 

The urls look something like this...

 

http://domain.com/login/users/user23078/questionnaire/44/photos/roachclip-008.jpg

 

So my question is this...

 

How do I use ubot to download the image and at least maintain the file type? I don't care if the image is called image1.jpg as long as the original filetype is maintained.

 

Thanks in advance for any insight!

Link to post
Share on other sites

Josh,

 

I know it's not the most convient, but you can require you clients to upload all images with the same file type.

 

This would be the easiest, but probably not the most convient solution.

Link to post
Share on other sites

Josh,

 

I know it's not the most convient, but you can require you clients to upload all images with the same file type.

 

This would be the easiest, but probably not the most convient solution.

 

Yeah I thought of that, but clients hate that sort of thing. I'm currently talking with our programmers to see how long it would take to make a converter so that ll images get automatically converted to one format. But if I can do it without spending money on programming that would be ideal.

Link to post
Share on other sites

There are several online photo conversion utilities that might help... generally you don't have to specify the type of image you are uploading, just the type of image you want it converted to. So you would 1) save the image in whatever format they upload it in, 2) run it through the conversion utility and convert it to .jpg (for example), 3) download the converted image. Then they would all be in the same format.

 

I don't recall the conversion site I used, I know there are quite a few to choose from... just Google it and you will find one that works for you.

 

http://ubotstudio.com/forum/public/style_emoticons/default/smile.gif

Link to post
Share on other sites

There are several online photo conversion utilities that might help... generally you don't have to specify the type of image you are uploading, just the type of image you want it converted to. So you would 1) save the image in whatever format they upload it in, 2) run it through the conversion utility and convert it to .jpg (for example), 3) download the converted image. Then they would all be in the same format.

 

I don't recall the conversion site I used, I know there are quite a few to choose from... just Google it and you will find one that works for you.

 

http://ubotstudio.com/forum/public/style_emoticons/default/smile.gif

 

The problem is downloading the image in the first place. In ubot it forces you to specify a file extension when downloading. But the file extensions are always different.

Link to post
Share on other sites

The problem is downloading the image in the first place. In ubot it forces you to specify a file extension when downloading. But the file extensions are always different.

 

Try a little regex like this:

 

navigate("http://www.toxel.com/inspiration/2009/04/29/12-beautiful-concept-car-designs/", "Wait")

wait(3)

download file($scrape attribute(<title="Fastlane Concept Car">, "src"), "{$special folder("Desktop")}{$find regular expression($scrape attribute(<title="Fastlane Concept Car">, "src"), "/\\w*\\.(jpeg|jpg|bmp|png|tiff)")}")

 

 

 

John

 

 

 

  • Like 2
Link to post
Share on other sites

Thanks everyone for your input. My programmer went ahead and added conversion functionality to our system last night. I'm sure someone else will have use of this info though!

Link to post
Share on other sites
  • 4 months later...

Try a little regex like this:

 

navigate("http://www.toxel.com/inspiration/2009/04/29/12-beautiful-concept-car-designs/", "Wait")

wait(3)

download file($scrape attribute(<title="Fastlane Concept Car">, "src"), "{$special folder("Desktop")}{$find regular expression($scrape attribute(<title="Fastlane Concept Car">, "src"), "/\\w*\\.(jpeg|jpg|bmp|png|tiff)")}")

 

 

 

John

 

Hi John,

 

How would I do this whilst ignoring the title of the image? Like the OP I have images I need to download all of which vary in file extension.

 

 

I would have a list of all the image URLs - I then navigate to them all one by one and download the files, but the file name is the problem I have - I save them as .jpg but this causes an issue for some of the images

 

Thanks

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...