Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Auto-downloader

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Auto-downloader
blargmob
Member #8,356
February 2007
avatar

Alright I'm writing a program using wget in C++. Now I need to know this:
Say I have a base webpage where all the downloads are, such as:

Base Page: www.coolvideos.com/funny/index? All video downloads have links like: www.coolvideos.com/funny/index?owned.wmv www.coolvideos.com/funny/index?car.wmv www.coolvideos.com/funny/index?arm.wmv

Now, using wget, how can I have the program auto-magically download all the videos that are on the page www.coolvideos.com/funny/index? without entering the names in manually?

???

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

bamccaig
Member #7,536
July 2006
avatar

I'm not very familiar with wget, but I think you need to give it a file URL. If you gave it the URL for /funny/index you would more than likely download just that because the Web server would give wget what it asked for. What you need is to get a list of the files available at the URL so you can request them individually.

For example, DownThemAll, a Firefox extension lists all of the links in a Web page as well as the images. You can then select which ones you want to download. I don't think there is any way of automagically determining what files are available on any Web server. Some Web servers seem to be configured to give a directory listing when a directory is requested (and no default resource exists), however, that can't be relied upon.

Hopefully better replies will follow. :)

CGamesPlay
Member #2,559
July 2002
avatar

Yes. Read wget --help for more information.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

bamccaig
Member #7,536
July 2006
avatar

CGamesPlay said:

Yes. Read wget --help for more information.

Oh wow, it's so much more powerful than I thought it was. :o

Hard Rock
Member #1,547
September 2001
avatar

Can you stop starting 8 different threads (well you have 3 right now) that are all for the same purpose?

_________________________________________________
Hard Rock
[ Stars Dev Company ][ Twitter ][Global Warming: ARA My TINS 07 Entry][Pong Ultra Website][GifAllegS Ver 1.07]
"Well there's also coolwebsearch but we'll let that be an IE exclusive feature" - arielb on the New Browser Plugins "What's better, HTML or Variables?"

Goalie Ca
Member #2,579
July 2002
avatar

try curl. It's a program and a library.

-------------
Bah weep granah weep nini bong!

blargmob
Member #8,356
February 2007
avatar

Thanks for the help,and I'll stop posting new threads.But now I got the project finished and I want to put it on another PC. But when I try to, it tells me the app failed to launch because it wasn't configed properly. I built the project for a release in MSVC, now what do I do?

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

ReyBrujo
Moderator
January 2001
avatar

Check here and here for wget help.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

blargmob
Member #8,356
February 2007
avatar

It's not a problem with wget, it's a problem with me...I don't know how to release this binary and have it run properly on another machine, like what resources it needs..

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

ReyBrujo
Moderator
January 2001
avatar

Click here, it should start downloading a zip package, unzip it and get wget.exe, that should be all you need. Now, the best you can do is creating a txt file with all the videos you want to download, one link per line, and execute wget -i file.txt

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

blargmob
Member #8,356
February 2007
avatar

Well, the other machine already has wget.exe in WINDOWS. And it still says that the app wasn't configed properly. What am I missing? Are there certain dll's I need?

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

ReyBrujo
Moderator
January 2001
avatar

Not really, try executing wget http://www.google.com to see what it does. Also, do wget --version to see which version is.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

blargmob
Member #8,356
February 2007
avatar

The wget on the other machine works fine, it's just that I can't run my c++ program on it..

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

ReyBrujo
Moderator
January 2001
avatar

Ah, and your program uses Allegro? Then you need alleg42.dll (or whichever version you used to compile the program). Also, if you compiled with Visual C++, the C++ runtime files (although you likely already have them, unless you are using a very new compiler and tried to run the executable in a very old computer).

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

blargmob
Member #8,356
February 2007
avatar

Nah..it doesn't use allegro..but it still refuses to operate. ???

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

ReyBrujo
Moderator
January 2001
avatar

Can you tell me anything else other than "refuses to operate"? There are thousands of reasons about why the program would not run and, believe me, you don't want me to start enumerating them.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

emupaul
Member #9,393
January 2008
avatar

Goalie Ca said:

try curl. It's a program and a library.

I mentioned this lib in a different thread =), I say let em' fumble with wget.

BAF
Member #2,981
December 2002
avatar

What compiler did you use to compile the program?

blargmob
Member #8,356
February 2007
avatar

I'm using Visual Studio 9.0 (2008), so whatever compiler that comes with. I don't think that it's a real big, internal problem. I've had this issue before and it was just a simple problem with some kind of dll's or other resources.

What I'm doing is building the app as a release, than I'm simply copying the output .exe into the LAN and pasting it onto the other machines desktop. When I try to run it, I get a window that says:

This application has failed to start because the application configuration is incorrect.

???

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

BAF
Member #2,981
December 2002
avatar

Thats your problem. You need the right MSVC runtime components on the other computer. I don't know much about it, but Matthew does.

Matthew Leverton
Supreme Loser
January 1999
avatar

Compile with /MT to use the static runtime. If you use any other libraries, you'll have to compile them the same way.

blargmob
Member #8,356
February 2007
avatar

@BAF:

You're probably right, but then how come an allegro app runs fine on the other machine when all I need to include with the binary are the dll's and images, sounds etc. ???

@Mat:

/MT? What's that? :-/

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

Matthew Leverton
Supreme Loser
January 1999
avatar

blargmob
Member #8,356
February 2007
avatar

Hmm..so I changed the Runtime Library option to /MT, and I got lots of errors saying that functions were already defined in [fillintheblank].dll ??? That's not supposed to happen! :(

---
"No amount of prayer would have produced the computers you use to spread your nonsense." Arthur Kalliokoski

Matthew Leverton
Supreme Loser
January 1999
avatar

Do you a clean rebuild and heed my advice "If you use any other libraries, you'll have to compile them the same way."

 1   2 


Go to: