Jump to content


Photo

Download file


  • Please log in to reply
24 replies to this topic

#1 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 09:21 AM

Having issues with downloading a file.
Scraping part of a url, then Set the other part of the url to make the url complete.
So i have a direct download link to a file (in this case a .jpg).

Posted Image

Is there a tutorial where to see how the "download file" works?
If i remind it well there was no tutorial about that (i might be wrong though, please let me know).
Did i forgot to add something?

The #savetofile #imagelink was just for test purposes to see whether i get the full url to the file and that works.
So #imagelink contains the correct full link to the file.
*** AVAILABLE FOR HIRE, PM ME ***

#2 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 09:53 AM

Not knowing what you are seeing is kind of hard so let me ask a question.

Are you downloading an image that you see on the website? If so then why not do this;

http://screencast.com/t/5p1RtokT

If you are downloading a File then ignore my post here as others may have a solution for you.

NewSig2.png


#3 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 09:57 AM

Not knowing what you are seeing is kind of hard so let me ask a question.

Are you downloading an image that you see on the website? If so then why not do this;

http://screencast.com/t/5p1RtokT

If you are downloading a File then ignore my post here as others may have a solution for you.


I'm downloading a file (.jpg in this case).
$save choosen image makes a screenshot and not saving the original .jpg file.

http://ubotstudio.com/forum/index.php?/topic/6103-really-download-images-instead-of-taking-a-screenshot

Thanks for your time though ;)
*** AVAILABLE FOR HIRE, PM ME ***

#4 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 09:59 AM

Nooooooo

"Save Chosen Image" saves the image of the object. Trust me on this. I sold a few bots that saves the Google Maps image to a special folder. Not only the small image that Google produces but the large map too.

So screenshot? Noooooo. It don't do that.

NewSig2.png


#5 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 10:07 AM

Nooooooo

"Save Chosen Image" saves the image of the object. Trust me on this. I sold a few bots that saves the Google Maps image to a special folder. Not only the small image that Google produces but the large map too.

So screenshot? Noooooo. It don't do that.


Well it does not save the actual file.
It DOES make screenshots, as it leave parts of the website on the saved images borders.
I got that to work but that's really not what i want.
*** AVAILABLE FOR HIRE, PM ME ***

#6 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 10:11 AM

This is what happen when using $save choosen image

Posted Image

See the borders, it's having parts of the website on it.
Absolutely not what i want.
So it's a screenshot.

I want to $download file the actual file (whether it's a .jpg in this case or any other extension in the future).
*** AVAILABLE FOR HIRE, PM ME ***

#7 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 10:41 AM

You know...I guess I do remember that now that you mention it from waaaaaaay back.

I have never tried what you are attempting. I think I will give that a shot and see what happens for me.

I'll let you know.

NewSig2.png


#8 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 10:48 AM

Alright BotBuddy.

In the meanwhile, if someone can point me how to get the $download file to work that would be very kind :)
*** AVAILABLE FOR HIRE, PM ME ***

#9 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 10:49 AM

Enigma,

Here is what I did.

http://screencast.com/t/qgs5QztXba

After looking at your original post I think I see the problem. You were specifying the folders where you wanted to save the image but you did not have a filename.

NewSig2.png


#10 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 11:01 AM

Enigma,

Here is what I did.

http://screencast.com/t/qgs5QztXba

After looking at your original post I think I see the problem. You were specifying the folders where you wanted to save the image but you did not have a filename.


That makes sense.
LOL. :lol:

Well i assumed it keeps the original filename.
So when a file is called blabla.jpg or blabla.exe then i assume it's been saved to the path i enter but keeps the original filename.

Isn't that possible, to just keep the original filename?
*** AVAILABLE FOR HIRE, PM ME ***

#11 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 11:12 AM

That would be a development question.

For me I guess it is a toss up.

NewSig2.png


#12 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 11:18 AM

That would be a development question.

For me I guess it is a toss up.


Was thinking of scraping the url but the directories (i.e. domain.com/439/283/9932/imagefile.jpg) are random.
So you can't say scrape url and remove "domain.com/439/283/9932" to keep imagefile.jpg as name because the directories are always different. :unsure:
*** AVAILABLE FOR HIRE, PM ME ***

#13 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 11:19 AM

That would be a development question.

For me I guess it is a toss up.


Thanks for your time anyway.
Hope someone else has a solution: Save the file with original filename.
*** AVAILABLE FOR HIRE, PM ME ***

#14 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 11:25 AM

Well you can scrape that whole url and then strip out the filename. It would take some thought but it can be done.

NewSig2.png


#15 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 04:28 PM

Enigma,

Here is what I did.

http://screencast.com/t/qgs5QztXba

After looking at your original post I think I see the problem. You were specifying the folders where you wanted to save the image but you did not have a filename.


The following code would result:

C:\Users\User\Pictures\Download\day-month-year-time-minute-second\randomstring20characters.jpg

Posted Image

As you see, it results in error again. :huh:
*** AVAILABLE FOR HIRE, PM ME ***

#16 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 06:30 PM

One step at a time. Just do the Folder with the randomized filename. Don't do the "random list item" yet.

Build up to that node.

NewSig2.png


#17 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 07:09 PM

One step at a time. Just do the Folder with the randomized filename. Don't do the "random list item" yet.

Build up to that node.


Random list item is just set otherwise getting an error.
I clean $foldername at the begin of every loop, so there will only be 1 item in that list.
But before that i already did a $next list item, so if i do $next list item again it gives me an error.
There is nothing to randomize if there is only 1 item in the list.
It keeps using that item.

Anyway as said and shown in my last post, issue still not solved.
Isn't there anyone that never downloaded a file with uBot who can finally explain how it works? :huh:
*** AVAILABLE FOR HIRE, PM ME ***

#18 UBotBuddy

UBotBuddy

    Professional Botter

  • Moderators
  • 3111 posts
  • LocationVirginia
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 07:37 PM

WHAT! I showed you how to use it. Dude. My feelings are hurt. I've got to take a break now. My eyes are watering. (sniff...sniff...sniff...)

I'll be back............................

NewSig2.png


#19 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 02 February 2011 - 07:53 PM

WHAT! I showed you how to use it. Dude. My feelings are hurt. I've got to take a break now. My eyes are watering. (sniff...sniff...sniff...)

I'll be back............................


Well you see the error that comes up.
I have nothing changed on the script, only how to save it.

So it saves the file as fjn43r3rbsdfejf834.jpg
But it does not work.
I would rather save it as the original filename, but it's no problem for me to rename it while save it.
Both are ok but both don't work. :(
*** AVAILABLE FOR HIRE, PM ME ***

#20 Enigma

Enigma

    Advanced Member

  • UBot Users
  • PipPipPip
  • 824 posts
  • OS:Windows 7
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Dev

Posted 03 February 2011 - 06:49 AM

:(
*** AVAILABLE FOR HIRE, PM ME ***




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users