Josh 37 Posted March 20, 2012 Report Share Posted March 20, 2012 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! Quote Link to post Share on other sites
a2mateit 395 Posted March 20, 2012 Report Share Posted March 20, 2012 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. Quote Link to post Share on other sites
Josh 37 Posted March 20, 2012 Author Report Share Posted March 20, 2012 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. Quote Link to post Share on other sites
a2mateit 395 Posted March 20, 2012 Report Share Posted March 20, 2012 I will try to dig around a little more and see what I can come up with... I know how picky some clients can be. Quote Link to post Share on other sites
Legend 181 Posted March 20, 2012 Report Share Posted March 20, 2012 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 Quote Link to post Share on other sites
Josh 37 Posted March 20, 2012 Author Report Share Posted March 20, 2012 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. Quote Link to post Share on other sites
JohnB 255 Posted March 20, 2012 Report Share Posted March 20, 2012 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 2 Quote Link to post Share on other sites
Josh 37 Posted March 20, 2012 Author Report Share Posted March 20, 2012 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! Quote Link to post Share on other sites
Kev 69 Posted July 29, 2012 Report Share Posted July 29, 2012 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 Quote Link to post Share on other sites
JohnB 255 Posted July 29, 2012 Report Share Posted July 29, 2012 Kev, can you send me a short sample of the list? John Quote Link to post Share on other sites
Kev 69 Posted July 29, 2012 Report Share Posted July 29, 2012 sending you a PM John Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.