Staredit Network > Forums > Technology & Computers > Topic: Mediafire...
Mediafire...
Nov 25 2013, 8:16 am
By: payne  

Nov 25 2013, 8:16 am payne Post #1

:payne:

Hey guys,

Here is my situation: all throughout my adventures, I'd need to empty my camera from times to times to make sure I'd have space for more pictures. Now, some of those pictures, I wanted to keep the original quality (because FaceBook reduces their quality). The way I'd do it is that after uploading on FaceBook, I'd make sure I'd back-up all my files on MediaFire. Now, had I known that they wouldn't let me download multiple files at once, I wouldn't have been using them (or I would have Zip'd all my files together)... but now the error has been made, and I definitely do not intend on giving money to access that feature.

Is there a way someone could code a little program that would download every single file from a folder one-by-one into a certain directory of my computer without requiring my supervision? (That is, something I can leave running in the background and let it do its thing.)

Please help,
Thanks a lot in advance! :)



None.

Nov 25 2013, 3:50 pm jjf28 Post #2

Cartography Artisan

I have 99% of the code written for something like this, toss me an example link

Also what's the format of the input file, one link per line?

Post has been edited 1 time(s), last time on Nov 25 2013, 4:25 pm by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Nov 25 2013, 6:53 pm payne Post #3

:payne:

Quote from jjf28
I have 99% of the code written for something like this, toss me an example link

Also what's the format of the input file, one link per line?
Example link of a download link? Not sure what you want here.
And what do you mean by "format of the input file"? I do believe it is one link per file.

If you want, I can simply give you access to my account and you'll figure it out from there? I have a specific folder that I want to download completely.



None.

Nov 25 2013, 7:22 pm jjf28 Post #4

Cartography Artisan

Well my first assumption is you would be giving the program a .txt file of links to files you want downloaded, like:

Code
www.site.com/a.jpg
www.site.com/b.jpg
www.site.com/c.jpg


Which would then automatically get downloaded to the folder you select.

My second assumption is that you'd be giving the program mediafire links, which are links to a page with ads and crap which then automatically starts the download, if I had an example of one of the links you'd be providing the program, I could account for that extra step.

Now if my first assumption is wrong and you will not be providing links to the individual files and instead you want the program to download all the files a part of a page links to (or something to that effect - afaik there is no way to simply request a whole folder from an ftp site unless they specifically create a feature for that), then yeah your account details would help

Post has been edited 1 time(s), last time on Nov 25 2013, 7:36 pm by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Nov 25 2013, 11:32 pm jjf28 Post #5

Cartography Artisan

:( the picture link suffixes aren't exposed in the page source, i'm afraid if they're not there I don't have currently have the skills to automate the downloads.

The most I can do for you programming-wise is make it so you only have to right-click and copy link for each (the program would take all the links and download them to the given directory in the background) - would still be tedious, but would cut out a fair amount of work - LMK if you want me to make a program to that end.

Sorry I couldn't be more help.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Nov 26 2013, 5:11 am payne Post #6

:payne:

Isn't it possible for a program to open a link and work inside that new tab before returning to the older one?
If you can't do that, I guess yes, I'd like that easier way worked out: anything that helps is fine. :)

Maybe Farty could help?



None.

Nov 26 2013, 7:57 am LoveLess Post #7

Let me show you how to hump without making love.

Not sure how many pictures you have or high quality they are, but Google Drive lets you store up to 15 GB of data... Free. Not sure if they have a way to detect if one person has multiple accounts or something like that, but I think this would be the best method, especially since it allows you to store folders and is the simplest cloud system I have ever seen.



None.

Nov 26 2013, 9:34 am payne Post #8

:payne:

Quote from LoveLess
Not sure how many pictures you have or high quality they are, but Google Drive lets you store up to 15 GB of data... Free. Not sure if they have a way to detect if one person has multiple accounts or something like that, but I think this would be the best method, especially since it allows you to store folders and is the simplest cloud system I have ever seen.
I thought about switching. But the problem is that all my pictures are currently stored on MediaFire, and I'd like to get them out of there...



None.

Nov 27 2013, 12:12 am Apos Post #9

I order you to forgive yourself!

If you want, I can code something for you that would work.

@jjf28: Always look for APIs when you can: Bulk Download

You can create a program using their APIs to connect to a user account, then you can access whatever it is that they have exposed through it. (I haven't worked with their API before, but I'd assume it works.)

Edit: Payne: Personally, I like to use http://www.copy.com to backup my stuff. You get 15gb of free storage, (unless you join with a referral link in which case you start with 20gb) and for everyone you refer, you get an additional 5gb. With 5 friends for example, you have 25 extra gb.

Post has been edited 1 time(s), last time on Nov 27 2013, 1:40 am by Apos.




Nov 27 2013, 6:27 am payne Post #10

:payne:

I'd love you to help me out, Apos.
Do you need access to my account?



None.

Nov 27 2013, 11:06 am NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Apos
Edit: Payne: Personally, I like to use http://www.copy.com to backup my stuff. You get 15gb of free storage, (unless you join with a referral link in which case you start with 20gb) and for everyone you refer, you get an additional 5gb. With 5 friends for example, you have 25 extra gb.
Give me a referral link please.




Nov 27 2013, 3:28 pm Apos Post #12

I order you to forgive yourself!

Quote from payne
I'd love you to help me out, Apos.
Do you need access to my account?
I won't need to have your account, I can just make my own and test with it. If it works with mine, it will work all accounts.




Nov 27 2013, 11:05 pm payne Post #13

:payne:

Quote from Apos
Quote from payne
I'd love you to help me out, Apos.
Do you need access to my account?
I won't need to have your account, I can just make my own and test with it. If it works with mine, it will work all accounts.
Let me know when you're done with it. :)

Thanks in advance.



None.

Nov 28 2013, 6:05 am Apos Post #14

I order you to forgive yourself!

The whole code is done! I have no idea if it will work correctly when downloading a lot of files though. You'll have to try it out yourself!

I decided to be fancy and code the whole thing in Python:
http://pastebin.com/5d5WmEiC

There are a few things you'll have to do in your MediaFire before you can use the program.
  • Download the code to an empty directory. Save it as SenRequest.py
  • In your MediaFire settings, click on Developers.
  • Fill in your information, and create a new App.
  • You will now have an App ID and an API Key. Fill that information in the two first variables in the Python code.
  • Now, make sure you have Python installed. In my case, I used Python 2.7.5
  • Open up a cmd prompt. The easiest way to do that is to right click while holding shift anywhere in your directory where you saved the program (Assuming you use Windows 7), and select 'Open command window here'
  • Now type 'python SenRequest.py'
  • You can now type 'help' to see a list of available commands.
  • Type 'login' and fill in your email and password.
  • Once logged in, you can navigate through your MediaFire folders using 'cd' and 'ls'.
  • When in your chosen folder, type 'get'. It will download all files within that folder in the empty directory you started with.


Post has been edited 1 time(s), last time on Nov 28 2013, 6:12 am by Apos.




Nov 28 2013, 6:58 am payne Post #15

:payne:

Worked like magic (so far).

<3 <3

Post has been edited 1 time(s), last time on Nov 28 2013, 8:11 am by payne.



None.

Nov 28 2013, 7:09 am Apos Post #16

I order you to forgive yourself!

Quote from payne
Where do I find my App ID and API Key?
https://www.mediafire.com/#settings
You should see a Developers tab.

Edit: With Payne, I added a new command in case of crashes. If anyone wants it, add 'go' after the other commands, and call the function downloadAll() - Make sure to remove the files that have already been downloaded before hand from the DownloadList.txt.

Post has been edited 3 time(s), last time on Nov 28 2013, 9:02 am by Apos.




Nov 28 2013, 11:53 am payne Post #17

:payne:

Problem: the way MediaFire displays the files forces the user to scroll down in order to reveal more files. It seems like your program could only pick up the ones already shown up (hence why I'd keep having the perfect number of exactly a 100 pictures per folder).
Also, alerts when it crashes and finishes would be :awesome:.



None.

Nov 28 2013, 8:22 pm Apos Post #18

I order you to forgive yourself!

New version!
http://pastebin.com/QNVgmCBf

I changed a lot of little things:
  • Added a couple feedback texts to know a bit more about what is going on.
  • Added the alarms like you requested.
  • The password is now hidden when you enter it.
  • It can now download from multiple pages. (It will still display a maximum of 100 folders and 100 files when you type 'ls'.)
  • The command 'get' can now take an integer argument. If you used the old version and it stopped downloading at 100, to download the rest you'd type 'get 2' which will start on page 2 and keep going.


Post has been edited 2 time(s), last time on Nov 28 2013, 8:54 pm by Apos. Reason: Fixed a bug that was skipping two files.




Nov 28 2013, 10:33 pm payne Post #19

:payne:

I can't login anymore because it won't let me type in my password. :/

EDIT: I edited your code a bit so that it looks like your first version when it comes to the login, and it still won't let me login.

Also, I just realized it stopped in between 90 to 100 pictures, not a 100 all the time.

EDIT: Fixed. I can now login. Thanks Apos. <3

Post has been edited 2 time(s), last time on Dec 1 2013, 12:11 am by payne.



None.

Dec 1 2013, 3:38 am Apos Post #20

I order you to forgive yourself!

Tell me if you have anymore problems. The code is rather stable now, it's easy to add more commands to map to the MediaFire API.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
Please log in to shout.


Members Online: jun3hong, Callfbyad