LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2023, 11:48 AM   #1
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Download multiple mp3 files from a given url


I would like to download all the mp3 files from a specific url, and I think I can use curl or wget, but so far I;ve had to use a text file with all the actual links I've scraped off the page.
Code:
wget -nd -nc -r -l 2 --accept "mp3" --reject "*text" -t 2 -i url-to-mp3-file
Is there a beter way?
 
Old 12-09-2023, 05:22 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,852

Rep: Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310Reputation: 7310
it depends on the page, there are tools which can find all the links on a page and download all of them.
https://askubuntu.com/questions/5493...les-whole-site
 
Old 12-09-2023, 11:29 AM   #3
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Post

Quote:
Originally Posted by pan64 View Post
it depends on the page, there are tools which can find all the links on a page and download all of them.
https://askubuntu.com/questions/5493...les-whole-site
Thanks, pretty much what I'm doing already
Code:
wget -c -A '*.mp3' -r -l 1 -nd http://example.org/musics/
this is what I tried
Code:
wget -nd -nc -r -l 2 --accept "mp3" --reject "*text" -t 2 -i url-to-mp3-file
I think I should update mine to accept *.mp3 files
 
  


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
How to download a .deb given only the repository URL? alexander_bosakov Linux - Software 2 08-06-2011 06:29 AM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Linux - Newbie 2 06-04-2011 04:59 PM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Programming 7 06-04-2011 11:47 AM
merge files, given its odd and even given timepassman Linux - Software 1 05-08-2008 01:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:28 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