Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i want to sort out some mess im trying to figure out
i saw some site showing some mp3's
i took them from the .html source
i put them in one of my own here http://spx.t35.com/h.html
now i want to do in console wget -r http://spx.t35.com/h.html to get them
the problem is that it doesn't seem to download them and i don't know why
if anyone knows what the problem might be please tell me
As pointed out, yes, they are linking purely to jpg files. Why not just run a recursive wget on the original site with these links instead of making your own page?
they are mp3's ,they are to be renamed after download.
anyway,i told above that i am doing wget -r spx.t35...blabla
and i am getting nowhere.
but if the links are to be downloaded one by one things work
well.
i am not going to sit and click my mouse allot to download
them all,i think this might be a solution not only for me
but also for others to automate such tasks.
if so,it would be pretty helpful and neat if we are to think
of a solution.
one would be to use vim to
take out the html tags and have only the links and then
put "wget " in front of every line.
but how do i do that ?
wget should be able to follow the links in the html document (using -r) of course.
What error message is wget giving you (if any)?
If you are getting the html page and then editing it, you could also try using 'sed' or 'awk' to do it for you, rather than editing the file in an editor like vim.
Once you get the file with all the URLs, wget's -i option should do the trick, I suppose.
I got it to work. Apparently wget doesn't think h.html is valid html--maybe because it lacks a DOCTYPE line. But it works if you download h.html separately and then use wget like this:
$ wget -nd -A.jpg -ih.html --force-html
The optional "-nd" switch puts all the files in the current directory.
The optional "-A.jpg" causes only .jpg files to be accepted and doesn't keep others.
You could also try "-D web.tiscali.it" to only download from that domain.
Explain? I'm not sure if you are asking how to execute the command, explain why it works, or explain the process by which I came up with it.
Since I am developing a website as my new hobby, and learning all things web, it bothered me that h.html didn't have a DOCTYPE statement. I also read the man page for wget and noticed the "--force-html" switch (which I had seen before and wondered when you would ever use it). So I tried it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.