|
|
This thread is locked; no one can reply to it.
|
1
2
|
| Auto-downloader |
|
blargmob
Member #8,356
February 2007
|
Alright I'm writing a program using wget in C++. Now I need to know this: 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?
--- |
|
bamccaig
Member #7,536
July 2006
|
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. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
CGamesPlay
Member #2,559
July 2002
|
Yes. Read wget --help for more information. -- Ryan Patterson - <http://cgamesplay.com/> |
|
bamccaig
Member #7,536
July 2006
|
CGamesPlay said: Yes. Read wget --help for more information.
Oh wow, it's so much more powerful than I thought it was. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
Hard Rock
Member #1,547
September 2001
|
Can you stop starting 8 different threads (well you have 3 right now) that are all for the same purpose? _________________________________________________ |
|
Goalie Ca
Member #2,579
July 2002
|
try curl. It's a program and a library. ------------- |
|
blargmob
Member #8,356
February 2007
|
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? --- |
|
ReyBrujo
Moderator
January 2001
|
|
blargmob
Member #8,356
February 2007
|
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.. --- |
|
ReyBrujo
Moderator
January 2001
|
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 -- |
|
blargmob
Member #8,356
February 2007
|
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? --- |
|
ReyBrujo
Moderator
January 2001
|
Not really, try executing wget http://www.google.com to see what it does. Also, do wget --version to see which version is. -- |
|
blargmob
Member #8,356
February 2007
|
The wget on the other machine works fine, it's just that I can't run my c++ program on it.. --- |
|
ReyBrujo
Moderator
January 2001
|
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). -- |
|
blargmob
Member #8,356
February 2007
|
Nah..it doesn't use allegro..but it still refuses to operate. --- |
|
ReyBrujo
Moderator
January 2001
|
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. -- |
|
emupaul
Member #9,393
January 2008
|
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
|
What compiler did you use to compile the program? |
|
blargmob
Member #8,356
February 2007
|
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.
--- |
|
BAF
Member #2,981
December 2002
|
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
|
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
|
@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? --- |
|
Matthew Leverton
Supreme Loser
January 1999
|
|
blargmob
Member #8,356
February 2007
|
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 --- |
|
Matthew Leverton
Supreme Loser
January 1999
|
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
|