LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2006, 01:40 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
help making script with wget


I am trying to make a script that will download all of the videos from a website with wget. I am not sure if all the videos are in a directory called videos. They probably are, but I can not get a list of all of their names by trying to see what is in that directory because when I do try, my browser takes me back to the websites first page. The videos are in avi and and swf formats. The script probably needs to go through each link on the website, but not if the link is to a different website, to look for videos and if the link equals a video, it should be downloaded. Does anyone have any ideas how this can be done and suggestions?
 
Old 08-02-2006, 02:19 PM   #2
Black Chaos
LQ Newbie
 
Registered: Jan 2005
Posts: 15

Rep: Reputation: 0
http://man.linuxquestions.org/?query...ction=0&type=2

You want something along the lines of
Code:
wget -r -A.avi http://www.website.com
 
Old 08-02-2006, 03:45 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Thumbs up +1 ...

Thumbs up for mentioning one of them lesser-promoted LQ features...
 
Old 08-03-2006, 10:31 AM   #4
Black Chaos
LQ Newbie
 
Registered: Jan 2005
Posts: 15

Rep: Reputation: 0
I use that section of the site all the time. Really comes in handy.
 
Old 08-03-2006, 10:35 AM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Don't do this kind of automated scripting to download huge files. Webmasters generally hate this, and it's bad form to hog bandwidth this way...

I think such questions should not be encouraged here. Obviously the webmaster in question doesn't want you to see those files much less download them, so you shouldn't. If he wanted to allow downloads, he would probably allow you to browse that folder or put the links there.

One more thing - if he has put in .htaccess protection to his videos folder, you cannot bypass this with wget or any other technique that uses HTTP.

Last edited by vharishankar; 08-03-2006 at 10:37 AM.
 
Old 08-05-2006, 11:13 PM   #6
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Original Poster
Rep: Reputation: 85
What is your website Harishankar? I would like to download every file you have hosted a few times. I have two 500 gigabyte hard drives, and I need to put them to use.

Last edited by fakie_flip; 08-05-2006 at 11:15 PM.
 
Old 08-05-2006, 11:18 PM   #7
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
fakie_flip, I hope it was a joke.

I'm sorry, I don't host videos anyway.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wget - problems making it ignore a link jlpktnst Linux - Software 2 06-09-2006 06:31 AM
wget html grabbing script linuxhippy Slackware 4 11-25-2005 05:17 PM
script for wget EmOuBi Linux - Software 11 08-02-2005 01:03 PM
a script that runs wget every 3 minutes Menestrel Programming 3 07-26-2005 11:22 AM
GNU wget return codes for shell script greenhornet Programming 3 05-09-2004 07:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration