For GUI version go here.
This is a Linux Bash script which downloads MySpace music. It requires a program called “rtmpdump”, that is available in Ubuntu repositories, in a deb package or as source. If ffmpeg program is installed, music is automatically converted to mp3, otherwise it is saved as .flv.
Note that your computer may have to be restarted after you install rtmpdump!
Download: myspace-dl-cli
Usage example:
- ./getmusic.sh eminem
- ./getmusic.sh ladygaga
#!/bin/bash --
# Myspace music downloader v6.0
# Author of Myspace music downloader <= 5.4: Luka Pusic <luka@pusic.si>
# Author of modifications for a working v6.0 version: Basile Bruneau <basilebruneau@gmail.com>
#
version='6.0'
echo "MySpace music downloader by http://360percents.com & http://ntag.fr"
#Updater - begining
lversionFile=`wget -L "http://projets.ntag.fr/dlmyspace/script/lastversion" --quiet --user-agent="Mozilla" -O -`
lversion=`echo "$lversionFile" | grep 'version' | sed -e 's/version://' | head -n 1`
lversionChangelog=`echo "$lversionFile" | grep 'changelog' | sed -e 's/changelog://' | head -n 1`
lversionUrl=`echo "$lversionFile" | grep 'url' | sed -e 's/url://' | head -n 1`
if [ "$version" != "$lversion" ]; then
echo "[-] An update is available (v$lversion>v$version)"
echo "[-] Fast changelog: $lversionChangelog"
read -n1 -p "[-] Do you want to download it? (y/n) " wantupdate
echo ""
if [ "$wantupdate" = "y" ] || [ "$wantupdate" = "Y" ]; then
echo "[.] Update"
nameScript="${0##*/}"
directory1=`dirname "$0"`
directory2=`pwd`
directory="$directory2/$directory1"
echo "$directory"
echo "[.] Download..."
wget -L "$lversionUrl" --quiet -O "$directory/$nameScript"
echo "[.] Launch of the new version!"
echo ""
"$directory/$nameScript" $1
exit;
else
echo "[-] As you want!"
fi
echo ""
fi
#Updater - end
if [ -z "$1" ]; then
echo "";echo "Usage: `basename $0` [USER (eg. eminem)]";echo "";exit
fi
type -P rtmpdump &>/dev/null || {
read -n1 -p "I need a program called rtmpdump, do you wan to install it now? (y/n) "
echo [[ $REPLY = [yY] ]] && sudo apt-get -qq -y install rtmpdump || { echo "You didn't answer yes, or installation failed. Install it manualy. Exiting...";} >&2; exit 1; }
echo "[+] Requesting $1"
page=`wget -L "http://myspace.com/$1" --quiet --user-agent="Mozilla" -O -`
userid=`echo "$page" | grep '?userId' | sed -e 's/.*userId=//' -e 's/".*//' | head -n 1`
artistid=`echo "$page" | grep '&artid' | sed -e 's/.*artid=//' -e 's/&.*//' | head -n 1`
artistname=`echo "$page" | grep 'og:title' | sed -e 's/.*property="og:title" content="//' -e 's/".*//' | head -n 1`
if [ ! "$userid" ]; then
echo "[-] Trying second method for userID"
userid=`echo "$page" | grep 'UserId' | sed -e 's/.*UserId=//' | sed -e 's/&.*//g' | head -n 1`
fi
if [ ! "$userid" ]; then
echo "[+] ERROR: userid is empty!";
echo '[-] This is common when a change in MySpace occurs, or if this artists page is configured in a non usual way.';
echo '[-] See http://360percents.com/posts/linux-myspace-music-downloader/ or http://projets.ntag.fr/dlmyspace/ for more info.';
exit 1;
fi
echo "[-] User ID:$userid"
echo "[-] Artist Name: $artistname"
echo "[+] Requesting XML playlist"
link="http://www.myspace.com/music/services/player?action=getArtistPlaylist&artistUserId=$userid&artistId=$userid"
xml=`wget --quiet -L $link --user-agent="Mozilla" -O -`
songs=`echo "$xml" | tr ">" "\n" | grep 'songId' | tr ' ' "\n" | grep 'songId' | cut -d '"' -f 2`
if [ ! "$songs" ]; then
echo "[-] Trying second method for playlist xml."
link="http://www.myspace.com/music/services/player?artistid=$userid&scssb=2&action=getSortedSongs"
xml=`wget --quiet -L $link --user-agent="Mozilla" -O -`
songs=`echo "$xml" | tr ">" "\n" | grep 'songId' | tr ' ' "\n" | grep 'songId' | cut -d '"' -f 2`
fi
songcount=$((`echo "$songs" | wc -l`))
if [ $((`echo "$songs" | wc -c`)) -lt "2" ]; then
echo "[+] ERROR: no songs found at this url."
echo "[-] Please submit bugs to: http://360percents.com/posts/linux-myspace-music-downloader/ and http://projets.ntag.fr/dlmyspace/";exit
fi
echo "[+] Found $songcount songs."
for i in `seq 1 $songcount`
do
songid=`echo "$songs" | sed -n "$i"p`
link="http://www.myspace.com/music/player?sid=$songid"
songpage=`wget -L "$link" --quiet --user-agent="Mozilla" -O -`
title=`echo "$songpage" | grep 'class="song"' | sed -e 's/.*class="song" title="//' -e 's/".*//' -e 's/\\//-/g' | head -n 1`
rtmp=`echo "$songpage" | grep "rtmpte://" | tr "," "\n" | grep 'rtmpte://' | cut -d '"' -f 4 | head -n 1`
rtmpr=`echo "$rtmp" | sed -e 's/\.com.*$//' | head -n 1`
file=`echo "$rtmp" | sed -e 's/.*\.com\///' | head -n 1`
extension=`echo "$file" | sed -e 's/^.*\.//' | head -n 1`
rtmpfile=`echo "$file" | sed -e 's/\..*$//' | head -n 1`
if [ "$extension" = "mp3" ]; then
urlfile="mp3:$rtmpfile"
elif [ "$extension" = "m4a" ]; then
urlfile="mp4:$file"
fi
player=`echo "$songpage" | grep 'PixelPlayerUrl' | sed -e 's/^.*{"PixelPlayerUrl":"//' -e 's/".*//' | head -n 1`
if [ ! "$title" ]; then
title="$i" #use number if no title found
fi
echo "Downloading $title..."
rtmpdump -r "$rtmpr.com/" -a "" -f "LNX 11,2,202,235" -o "$artistname - $title.flv" -q -W "$player" -p "http://www.myspace.com" -y "$urlfile"
artistname=$(echo "$artistname" | sed -e 's%/%_%g')
#rtmpdump -l 2 -r "$rtmp" -o "$artistname - $title.flv" -q -W "http://lads.myspacecdn.com/videos/MSMusicPlayer.swf"
if which ffmpeg >/dev/null; then
echo "Converting $title to mp3..."
ffmpeg -y -i "$artistname - $title.flv" -metadata TITLE="$title" -metadata ARTIST="$artistname" -acodec libmp3lame -ab 192000 -ar 44100 -f mp3 "$artistname - $title.mp3" > /dev/null 2>&1 && rm "$artistname - $title.flv"
fi
done
I had to add -W “http://lads.myspacecdn.com/videos/MSMusicPlayer.swf” to the rtmpdump command line to get it to work.
Yes, you are right! Option -W “http://lads.myspacecdn.com/videos/MSMusicPlayer.swf” has to be included. Thanks!
Not working at all !
the userID is always empty and not in the page !
I modified it. It should work now ;)
Hello. Thanks for sharing your script. It doesn’t seem to download any songs for me with debian sid.
./getmusic.sh http://www.myspace.com/eminem
MySpace music downloader by http://360percents.com
[+] Requesting http://www.myspace.com/eminem
[+] Requesting XML playlist
[+] Found 1 songs.
Downloading ...
did myspace change something?
thanks.
Yes, in fact i think they did, but i fixed it. :) I tested and it works now.
Best regards!
Thanks!
Works perfect with most bands. Can’t get it to work with this band though:
./getmusic.sh http://www.myspace.com/thetoughshits
MySpace music downloader by http://360percents.com
[+] Requesting http://www.myspace.com/thetoughshits
[+] ERROR: userid or artistid is empty!
[-] This is common when a change in MySpace occurs, or if this artists page is configured in a non usual way.
[-] See http://360percents.com/posts/linux-myspace-music-downloader/ for info.
Just in case you want to make it perfect and need some myspace links that don't work with the current script.
Thanks again for sharing!
The following artists’ site didn’t work, but ladygaga worked fine… maybe they changed something again?
$ ./getmusic.sh http://www.myspace.com/smokefairies
MySpace music downloader by http://360percents.com
[+] Requesting http://www.myspace.com/smokefairies
[-] User ID: Artist ID:
[+] Requesting XML playlist
[+] Found 1 songs.
Downloading …
No, they didn’t change anything but your artist has a different setup.. I’m sorry… I’ll try to find a general solution for different setups later.
You can still download it tho with this bash script i wrote just for this artist:
Example on how to modify the last code posted here by admin on Nov 28.
Lets say we want the music from myspace.com/myreckless
The needed variables can be found on this fragment of one of the lines on the sourcecode:
plid=20482&profid=47034501&ptype=4&artid=3959576
in the line of the last code posted that says:
http://www.myspace.com/music/services/player?playlistId=28526&action=getArtistPlaylist&artistId=9987268&artistUserId=43453633
Thanks so much Admin, this code works just great!
change
playlistId number for the number in plid
artistUserId number for the number in profid
artistId number for the number in artId
Yes, this can be applied manually when my script cannot find the variables automatically. :)
Thank you for sharing this with others!!
Im trying to modify the plid, profid, and artid in the modfied code listed in the comments so i can download my own tracks from my music myspace page however im also getting the same output as “uu” was.
i.e:
“[+] Requesting http://www.myspace.com/bradaytes
[-] User ID: Artist ID:
[+] Requesting XML playlist
[+] Found 1 songs.
Downloading …”
it just says found 1 songs and doesn’t download anything. any ideas on how to get this work properly?
This should work:
PS: I also updated the original script so it downloads it too!
I modified your script to extract the MP3 file out of the FLV container.
After the rtmpdump command add the following line (requires ffmpeg to be installed)
ffmpeg -i “$title.flv” -acodec copy “$title.mp3″ &>/dev/null && rm “$title.flv”
Useful, thanks! :)
Hi !
I’m trying to download the song from http://www.myspace.com/stupeflip
And the output is :
MySpace music downloader by http://360percents.com
[+] Requesting http://www.myspace.com/stupeflip
[-] User ID:539871868 Artist ID:44182080
[+] Requesting XML playlist
[+] Found 2 songs.
Downloading Stupeflip vite!!! Radio edit…
Downloading LA MENUISERIE (extrait album)…
The script found the song, but the file produce are only 0 byte.
Can you help me for this ?
Thanks :)
Ok my bad ! That was my connection, the needed port was closed apparently :)
Great script :)
Thank you!! :)
This is sick!!! Thank you so much :).
Hey, works great, you should add ffmpeg as an obligatory piece of soft too.
I added as Boo in commen #7 reommened.
Today I noticed that this one is different: http://www.myspace.com/skreamuk
MySpace music downloader by http://360percents.com
[+] Requesting http://www.myspace.com/skreamuk
[-] Trying second method for userID
[-] User ID:125276228 Artist ID:1141839
[+] Requesting XML playlist
[+] Found 10 songs.
Downloading 1…
Downloading 2…
Downloading 3…
Downloading 4…
Downloading 5…
Downloading 6…
Downloading 7…
Downloading 8…
Downloading 9…
Downloading 10…
Nothing is downloaded.
Thanks for your feedback.
I’ll add Boo’s ffmpeg implementation and it will be applied if ffmpeg is installed on the system, but the script will not require them to install it :) Seems like a compromise?
As for different setups, i did not find a solution yet… Perhaps somebody could assist me?
Great compromise ;)
Very strange this example link I pasted above… Still can’t find whats wrong…
Actually I noticed that when I have songid and try to get the second xml for song – it’s not found.. So the tracklist xml is ok just each song xml is gone.
Why you don’t have comment notifications enabled?
I did not get any email on your response.
I think this is solved now. Well, if you get the email, let me know!
nope.
nothing in my inbox.
or you mean the script issue is solved and above artist from my example can be uploaded ?
and my second question about this script.
I understand everything just would like to know how did you know those 2 urls , which give you the xml results ?
where did you find them ?
i mean those two:
http://musicservices.myspace.com/Modules/MusicServices/Services/MusicPlayerService.ashx?action=getArtistPlaylist&artistId=$artistid&artistUserId=$userid
http://musicservices.myspace.com/Modules/MusicServices/Services/MusicPlayerService.ashx?action=getSong&ptype=4&sample=0&songId=$songid
The email should work… I don’t know what’s wrong…
I got everything by analyzing myspace source code and GET/POST headers that get sent after the page loads (for example, when you click on a song). You can easily observe this traffic with Firefox add-on called “Live HTTP headers”
It looks like this getmusic script might be the current solution for downloading music off of myspace. Hopefully it’s still working as of today (January 16, 2011). ???
However, I can’t get it to work as it I’m currently running Ubuntu Studio 9.10, I tried adding the repository for rtmpdump and installing via source and even from synaptic package manager – it seems to be installed – though when I run the get music script it says it’s not installed and says to install it manually.
Here’s what I did after rtmpdump apparently has been installed:
./getmusic.sh http://www.myspace.com/(band)
MySpace music downloader by http://360percents.com
I need a program called rtmpdump, do you wan to install it now? (y/n) y
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Couldn’t find package rtmpdump
You didn’t answer yes, or installation failed. Install it manualy. Exiting…
I did answer yes. I tried “yes” but immedaitely after “y” it ended up skipping ahead.
To anyone reading this: please help. :-/ Thanks! :-)
Did you try to install it via .deb package directly?
Download here for 64 bit version or here for 32 bit.
Seems like a weird error. Open up your terminal and type in: rtmpdump, then post your output.
Ah okay it is working now. Solution required a reboot.
I installed initially from source (not .deb). Though I don’t know which bit version it was, but I run a 64 bit CPU.
The rtmpdump output is now what I am assuming as normal:
“RTMPDump v2.1c
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
ERROR: You must specify a hostname (–host) or url (-r “rtmp://host[:port]/playpath”) containing a hostname
”
Well, sans “error” but I just ran the getmusic script and it worked perfect. :-) Thank you. Very cool stuff.
Yes, this looks normal now… It’s good to know that restart is required, i’ll note it above. I’m glad it works!!
P.S. – I just found this:
http://www.omgubuntu.co.uk/2010/06/easy-myspace-music-download-application/
…although the application opens, I am unable to actually download music with it. It is able to recognize the myspace url and list all of the tracks, and even shows the files downloading when I click “download” (and when viewing the folder where they’re going they show up temporarily but disappear after they seem to finish downloading), and then the files are just… gone. :( I’m wondering if it’s actually an rtmpdump thing or if it’s something else. The “dlmsm” app seems to work, though the files vanish after they finish. Any ideas on dlmsm?
This program shows tracks here too, but fails to download them even with rtmpdump installed. Also, it downloads a bunch of other programs…
But anyways, I think your rtmpdump is still not installed! Perhaps try restarting? Sound too Windows like, but you never know…
Now that getmusic.sh is working I don’t really have a need for that gui app (dlmsm). I did install that app via .deb, though, but it’s a kind of weird program for what it does offer with gui (seems more features would be available) but it’s not too bad. I’ll be sticking with the command line script though.
Cheers
Works most excellently, thanks a lot! :-)
hi,
i’ve tryed , it downloads empty files ( 0 size ) … any help ?
./getmusic.sh http://www.myspace.com/djdeepfogmuzik
this is command provided
I’ve just tryed your artist and it works. Do you have rtmpdump correctly installed? If you just installed it restart your computer. How about ffmpeg?
It works great!
I’ve made my first (very hugly) GUI, called getmusic-gui.sh for getmusic.sh
I’d like to share it whit you
First install zenity (for Maverick should be default installed)
I have getmusic.sh in the folder My_Script and i download from myspace in the folder Music.
Remember to do
sudo chmod 777 getmusic-gui.sh
#!/bin/bash
cd ~/Music
mkdir new
cd ~/Music/new
artist=`zenity –entry –title=”Download from Myspace is forbidden ;)” –text “What do you listen today?” –width 400 $0`
~/My_Script/./getmusic.sh http://www.myspace.com/“$artist” | zenity –title=”Info” –text-info –width 400
cd ~/Music
mv new “$artist”
end
If you want also the progress bar, you can add at the end of getmusic.sh (ofter “done”) this lines:
| zenity –progress –pulsate –auto-close
Sorry for my ridiculous english…bye!
Thank you for your cool contribution, Silvio! :)
Thanks. It goes great. You solve my problems.
Does not work for me. Changed the RTMPDump option -W to -s (using v 1.9 -W was not recognized) but get
ERROR: rtmp server sent error
ERROR: rtmp server requested close
for http://www.myspace.com/solomunakaplay. Am I missing something?
I’m using RTMPDump v 2.3 on Ubuntu and it works. I suggest you upgrade.
Best regards!
Tested with rtmpdump and the flv download works great!
But the ffmpeg command just renames the files and doesn’t convert them to mp3! I can’t play them on portable-mp3-players, audacious2, etc..
To convert them use this command:
ffmpeg -i “$title.flv” -f mp3 “$title.mp3″
and it works perfectly!
@anonymous
Fixed, thanks.
Forgort to say, I’m using:
* rtmpdump – 2.3
* ffmpeg – git-2611e52 (Feb 6 2011)
myspace Lieder mit Bash-Skript herunterladen « Rorschachs Tagebuch
Hello, I cannot realize how to add your website in my rss reader. Can you Help me, please
Click here: http://360percents.com/feed/rss/
» MySpace Music Downloader Rerosku.it
Hey, if you change “-f mp3″ to “-acodec copy” in the ffmpeg command, you can get an mp3 without having to re-encode the data.
./getmusic.sh: line 55: seq: command not found
Bash 3 does not have seq. I am on OSX.
I am trying to figure out how to do a string expansion with a variable.
echo eval {1..$songcount}
Expands correctly but I do not know how to place this into the for statement
for i in `jot 1 “$songcount”`
WORKS!
the script will say that it found X songs
[+] Found 8 songs.
but it only downloads 1 song. the final song in the list.
Try using this implemented for loop instead of seq or jot:
for (( i=1; i <= $songcount ; i++ ))Tell me if it works. Best regards
Boom! Works perfect for OSX 10.6.7. Thanks for posting this script!
Thanks for the great script. I slightly improved the script in order to write ID3 tags (artist and title) to the mp3 file. Furthermore, I set the bitrate to 128k (default is 64k). I attached the diff below.
--- /tmp/getmusic.sh 2011-03-03 23:09:10.000000000 +0100
+++ bin/getmusic.sh 2011-03-27 16:44:59.317521003 +0200
@@ -17,6 +17,7 @@
page=`wget -L "$1" --quiet --user-agent="Mozilla" -O -`
userid=`echo "$page" | grep '?userId' | sed -e 's/.*userId=//' -e 's/".*//' | head -n 1`
artistid=`echo "$page" | grep '&artid' | sed -e 's/.*artid=//' -e 's/&.*//' | head -n 1`
+artistname=`echo "$page" | grep -o 'content=".* |' -m1 | sed -e 's/content="//' -e 's/ |.*//'`
if [ ! "$userid" ]; then
echo "[-] Trying second method for userID"
userid=`echo "$page" | grep 'UserId' | sed -e 's/.*UserId=//' | sed -e 's/&.*//g' | head -n 1`
@@ -28,6 +29,7 @@
exit 1;
fi
echo "[-] User ID:$userid Artist ID:$artistid"
+echo "[-] Arist Name: $artistname"
echo "[+] Requesting XML playlist"
link="http://www.myspace.com/music/services/player?artistUserId=$userid&action=getArtistPlaylist&artistId=$artistid"
xml=`wget --quiet -L $link --user-agent="Mozilla" -O -`
@@ -46,10 +48,10 @@
#use number if no title found
title="$i"
fi
-echo "Downloading $title..."
+echo "$i/$songcount: Downloading $title..."
rtmpdump -r "$rtmp" -o "$title.flv" -q -W "http://lads.myspacecdn.com/videos/MSMusicPlayer.swf"
if which ffmpeg >/dev/null; then
- echo "Converting $title to mp3..."
- ffmpeg -y -i "$title.flv" -f mp3 "$title.mp3" > /dev/null 2>&1 && rm "$title.flv"
+ echo "$i/$songcount: Converting $title to mp3..."
+ ffmpeg -y -i "$title.flv" -metadata TITLE="$title" -metadata ARTIST="$artistname" -f mp3 -ab 128k "$artistname - $title.mp3" > /dev/null 2>&1 && rm "$title.flv"
fi
done
Thank you for sharing this cool improvements! :)
@Simon
Thank you for your contribution, I included it in the new release.
As of 27th April 2011 the downloader is just downloading zero-length FLV files, while dlmsm is also creating, and then deleting, zero length FLV files.
The script works fine for me… Are you sure it doesn’t work with any artists?
The script is now working with the artist (Pigbag) that was not downloading previously, so it must have been a local or Myspace problem at my end. (dlmsm is still not functioning).
Thanks.
Hi guys,
I can’t download the songs in this url http://www.myspace.com/blakdyakmusic/music. I tried accessing http://www.myspace.com/blakdyakmusic using ff but it redirects me to http://www.myspace.com/blakdyakmusic/music.
I followed David’s instructions hoping to download ‘em but I can’t find plid in the source code.
They don’t have a “real playlist” but the player gets their song list here:
http://www.myspace.com/music/services/player?scsd=2&scsf=14&scssb=2&action=getSortedSongs&artistid=47073852
The file looks like a playlist.
Is there a way for me to get the song? I’m just interested in Reggae Summer :D.
Summer Reggae I mean.
Woooo… Thank you for the link. I experimented by substituting songId with the songId of Summer Reggae and voila, I got it.
Thank you so much.
Here’s the script by the way,
#!/bin/bash –
echo “This will download songs…”
link=”http://musicservices.myspace.com/Modules/MusicServices/Services/MusicPlayerService.ashx?action=getSong&ptype=4&sample=0&songId=79979396″
songpage=`wget -L “$link” –quiet –user-agent=”Mozilla” -O -`
title=`echo “$songpage” | tr “” “\n” | grep -v ‘title’ | sed -e ‘/^$/d’ | sort -u`
rtmp=`echo “$songpage” | tr “” “\n” | grep ‘rtmp://’ | uniq`
echo “Downloading $title…”
rtmpdump -r “$rtmp” -o “summer.flv” -q -W “http://lads.myspacecdn.com/videos/MSMusicPlayer.swf”
ffmpeg -i summer.flv -acodec copy “summer.mp3″ &>/dev/null && rm “summer.flv”
done
Hi people,
I’ve been trying everything suggested both in the article and the comments, without success. The “problematic” link is:
http://www.myspace.com/carolynmarkofficial/music/
(album Pros and Cons of Collaboration)
Anyone’s help would be much appreciated. Thanks!
Here is their “playlist”: http://www.myspace.com/music/services/player?artistid=46630740&scssb=2&scsf=14&scsd=2&action=getSortedSongs
So, the customized script for you is:
Good luck
Thank you very much! Worked like a charm :-)
Even though the http://musicservices.myspace.com/ seems down now which means the *.xml file containing rtmp:// link is not available, just hope they aren’t implementing changes to the scheme.
Cheers!
yeah, what do you think guys, how long it will be like that?
the player on any myspace profile seems to work but http://musicservices.myspace.com/ is down second day.
I think it’s permamnent change…
Yes, i think it’s a permanent change too… I will update the script sometime soon!
EDIT: Fixed! The script will now download even more songs :)
great. thx!
Congratulations for the script, it’s awesome! I can download many songs. But I have an issue with an artist. It’s lovettmusic (http://myspace.com/lovettmusic). The script doesn’t download the 4 songs :(! I hope you will have the time to look this problem… Thanks!
Your artist uses another method for their playlist, but i fixed the script so it works now :) Download the new version and happy downloading! Best regards
Amazing, thanks it works for lovettmusic :). However with this new version I have a new issue: when I download the artist nyxtone, only 1 song is found, but with the previous version 2 songs are found (the artist has 2 songs)…
Best regards
This is fixed now, I hope. :)
And, an other bug: the script want to add metadata to the mp3, but with my version of ffmpeg (version SVN-r13582 – on Debian) you can’t add metadata :(. And so, ffmpeg doesn’t recognize the command and abort the conversion. (“ffmpeg: unrecognized option ‘-metadata’”). I have deleted -metadata in the script so it works, but it would be better if the script detected the version of ffmpeg!
This is a sensitive issue, and I think version checking isn’t really the best solution… Lets try to think of something else…
Yes, it seems fixed, thanks a lot!
new change… MySpace doesn’t provide the artid now…
This is now fixed. Artid is just not needed anymore and this makes it easier for me :)
Hi, I tried your script and it didn’t work so I updated it for my specific case. Not sure whether it is a general solution but I post it anyways. Cheers.
--- getmusic.sh 2011-06-05 13:10:30.000000000 +0200
+++ bin/getmusic.sh 2011-06-21 18:08:49.306580775 +0200
@@ -20,14 +20,20 @@
echo "[-] Trying second method for userID"
userid=`echo "$page" | grep 'UserId' | sed -e 's/.*UserId=//' | sed -e 's/&.*//g' | head -n 1`
fi
-if [ ! "$userid" -o ! "$artistid" ]; then
- echo "[+] ERROR: userid or artistid is empty (user: $userid, arstist: $artistid)!";
- echo '[-] This is common when a change in MySpace occurs, or if this artists page is configured in a non usual way.';
- echo '[-] See http://360percents.com/posts/linux-myspace-music-downloader/ for info.';
+if [ ! "$userid" -a ! "$artistid" ]; then
+ echo "[+] ERROR: userid and artistid are empty!";
+ echo "[-] This is common when a change in MySpace occurs, or if this artist's page is configured in a non usual way.";
+ echo "[-] See http://360percents.com/posts/linux-myspace-music-downloader/ for info.";
exit 1;
+elif [ ! "$userid" ]; then
+ echo "[+] WARNING: userid not found, using artistid instead";
+ userid="$artistid";
+elif [ ! "$artistid" ]; then
+ echo "[+] WARNING: artistid not found, using userid instead";
+ artistid="$userid";
fi
echo "[-] User ID:$userid Artist ID:$artistid"
-echo "[-] Arist Name: $artistname"
+echo "[-] Artist Name: $artistname"
echo "[+] Requesting XML playlist"
link="http://www.myspace.com/music/services/player?artistid=$artistid&scssb=2&action=getSortedSongs"
xml=`wget --quiet -L $link --user-agent="Mozilla" -O -`
Thanks! I fixed the script now and your comment saved me some time! ;)
This script is wonderful, for most artists. I am having trouble with one, Lucas Santtana at http://www.myspace.com/santtana (note the double “t”).
Can you explain how to locate the Artist ID and modify the customized script? I can not see “artid” or anything similar in the page source, so I am looking in the wrong place.
Artist ID is simply not needed anymore. The script is now fixed and it works with “santtana”. :)
You deserve a big, wet kiss!
Thank you.
i’m sorry for being such a beginner, the script worked and found the songs but the result was 0 byte :( someone had the same problem above and said the port has to be opened first..can someone explain to me how to do this? i’m using a mobile broadband connection.
I changed the script.
– fixed a typo (Arist -> Artist)
– include Artist name in the generated filename – otherwise it’s a mess when you download multiple artists
– remove the -ab 128k because it makes no sense and gets ignored. Since acodec is set to ‘copy’ (with the explicit goal of not re-encoding, which is the right way to do it) the bitrate is decided by the version inside the .flv file.
here is the diff:
@@ -27,7 +27,7 @@
exit 1;
fi
echo “[-] User ID:$userid”
-echo “[-] Arist Name: $artistname”
+echo “[-] Artist Name: $artistname”
echo “[+] Requesting XML playlist”
link=”http://www.myspace.com/music/services/player?artistid=$userid&scssb=2&action=getSortedSongs”
xml=`wget –quiet -L $link –user-agent=”Mozilla” -O -`
@@ -56,9 +56,9 @@
title=”$i” #use number if no title found
fi
echo “Downloading $title…”
- rtmpdump -r “$rtmp” -o “$title.flv” -q -W “http://lads.myspacecdn.com/videos/MSMusicPlayer.swf”
+ rtmpdump -r “$rtmp” -o “$artistname – $title.flv” -q -W “http://lads.myspacecdn.com/videos/MSMusicPlayer.swf”
if which ffmpeg >/dev/null; then
echo “Converting $title to mp3…”
- ffmpeg -y -i “$title.flv” -metadata TITLE=”$title” -metadata ARTIST=”$artistname” -acodec copy -f mp3 -ab 128k “$artistname – $title.mp3″ > /dev/null 2>&1 && rm “$title.flv”
+ ffmpeg -y -i “$artistname – $title.flv” -metadata TITLE=”$title” -metadata ARTIST=”$artistname” -acodec copy -f mp3 “$artistname – $title.mp3″ > /dev/null 2>&1 && rm “$artistname – $title.flv”
fi
done
Thanks! Will fix! :)
Looks like stopped working.
Only for me or anyone else can confirm that ?
It works for me. I tested with Eminem, which artist did you use?
you’re right. it was some temp network problem on my side.
i hope it will help; for me, the flv files downloaded were empty, and ffmpeg could’nt convert them into mp3, so…
- after installin’ ffmpeg ( “sudo apt-get install ffmpeg” ), be sure to download all the codecs by typing :
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20061022.tar.bz2
tar -xjvf all-20061022.tar.bz2
sudo mkdir -p /usr/lib/codecs
sudo cp all-20061022/* /usr/lib/codecs/
- be sure to download the last “librtmp0″
( http://pkgs.org/package/librtmp0 )
-be sure to download the last “rtmpdump”
( http://pkgs.org/package/rtmpdump )
For me, now, it works like a charm :)
Hi, in the version I just downloaded on line 62 you still have
ffmpeg -y -i “$title.flv”
But is should be
ffmpeg -y -i “$artistname – $title.flv”
Fixed, thank you!
There’s a little bug in v5.1 – ffmpeg is given a wrong input filename, and therefore converting to mp3 fails.
Fixed version (with the broken version as comment):
echo “Converting $title to mp3…”
# ffmpeg -y -i “$title.flv” -metadata TITLE=”$title” -metadata ARTIST=”$artistname” -acodec copy -f mp3 “$artistname – $title.mp3″ > /dev/null 2>&1 && rm “$title.flv”
ffmpeg -y -i “$artistname – $title.flv” -metadata TITLE=”$title” -metadata ARTIST=”$artistname” -acodec copy -f mp3 “$artistname – $title.mp3″ > /dev/null 2>&1 && rm “$artistname – $title.flv”
fi
After fixing that, the script works perfect :-)
Fixed, thanks!
I’m trying to download a specific album by an artist. Is this possible with this script? Also, I can’t get transcoding to MP3 to work, I have ffmpeg installed, however, I’m on Fedora 15, I can get .flv files which are complete, but ffmpeg auto transcoding doesn’t work. I’m going to work on both my issues, see if I can resolve them, but any help would be appreciated.
ffmpeg issue fixed, change this line: ffmpeg -y -i “$artistname – $title.flv” -metadata TITLE=”$title” -metadata ARTIST=”$artistname” -acodec copy -f mp3 “$artistname – $title.mp3″ > /dev/null 2>&1 && rm “$artistname – $title.flv”
to:
ffmpeg -y -i “$artistname – $title.flv” -metadata TITLE=”$title” -metadata ARTIST=”$artistname” -acodec copy -f mp3 “$artistname – $title.mp3″ > /dev/null 2>&1 && rm “$artistname – $title.flv”
Well, after a bit of work, it looks like I’ve ran into a problem, the XML for the album I want is at this address: http://www.myspace.com/music/services/player?action=getArtistPlaylist&artistUserId=82560405&artistId=82560405&playlistId=17687227
However, when loaded, it gives this message:
The specified playlist is private.
Anyone know a work around?
Try this:
http://www.myspace.com/music/services/player?action=getArtistPlaylist&artistUserId=82560405&artistId=82560405
It gives some songs…
Hi,
thanks for your script!
At first, the transcoding from flv to mp3 failed without a notice. (I recommend removing “2>&1″ to not hide the error.) I found out that the problem was a long dash (–) instead of a minus (-) on line 62:
Hence the input file was not found.
After fixing this it works flawlessly! (v5.2)
looks like stopped working…
any ideas ?
Probably a change in MySpace… I will look into it.
yeah, tried to get what’s going on but all myspace links seem to work.
maybe rtmpdump is not working with their player anymore…
any progress on that ?
Fixed, finally :)
what was changed ?
great. thanks!
i tested and seen “-l 2″ change but is it really working for you ?
here still the same. downloads 0kb flv files..
The fix was user submitted and it doesn’t really fix anything. I’m working to fix it now. MySpace changed a lot of things, so rtmpdump now requires other arguments…
Could you update the script to make it work again, please?
Thanks in advance!
Fixed, thank you for your patience!
It only downloads 0 kb .flv.
I’m on Ubuntu 10.04.3, I updated to the last rtmpdump (2.4) and still no content gets downloaded.
I read all the comments, but I can’t seem to find a solution.
The output:
$ ./myspace-dl.sh queen
MySpace music downloader by http://360percents.com
[+] Requesting queen
[-] User ID:393681726
[-] Artist Name: Queen
[+] Requesting XML playlist
[-] Trying second method for playlist xml.
[+] Found 5 songs.
Downloading Keep Yourself Alive (Album Version)…
Converting Keep Yourself Alive (Album Version) to mp3…
Downloading Seven Seas Of Rhye…
Converting Seven Seas Of Rhye to mp3…
Downloading Killer Queen (Album Version)…
Converting Killer Queen (Album Version) to mp3…
Downloading Bohemian Rhapsody…
Converting Bohemian Rhapsody to mp3…
Downloading Somebody To Love…
Converting Somebody To Love to mp3…
…and the result is 5 correctly named empty (0 byte) FLV files.
here the same. after this change still not working :(
I was hoping the fix which was submitted to github last week would work, but unfortunately it doesn’t. I’m currently without my main computer so the patch will take longer. It would be very helpful if somebody could help me fix it and make a pull request on github. It looks as if MySpace now requires more rtmpdump arguments… I’m really sorry to leave you guys waiting like this. Thank you for your patience!
great!
can’t wait for new updates.
did you guys find out what’s the problem here ?
So, what’s the news?
waiting …
Sorry, but the whole thing got a lot more complicated. I would really need some help with rtmpdump, I just can’t get it to work!
./myspace-dl.sh http://www.myspace.com/rasputina
MySpace music downloader by http://360percents.com
[+] Requesting http://www.myspace.com/rasputina
[-] Trying second method for userID
[-] User ID:0
[-] Artist Name:
[+] Requesting XML playlist
[-] Trying second method for playlist xml.
[+] ERROR: no songs found at this url.
[-] Please submit bugs to: http://360percents.com/posts/linux-myspace-music-downloader/
/hold$ ./myspace-dl.sh http://www.myspace.com/582113713/music/playlists/black-nasty-1441245
MySpace music downloader by http://360percents.com
[+] Requesting http://www.myspace.com/582113713/music/playlists/black-nasty-1441245
[-] Trying second method for userID
[-] User ID:0
[-] Artist Name:
[+] Requesting XML playlist
[-] Trying second method for playlist xml.
[+] ERROR: no songs found at this url.
[-] Please submit bugs to: http://360percents.com/posts/linux-myspace-music-downloader/
/hold$
ive tried band name,a url to the bands page/player/radio and the play list made from the songs…
nothing working..
I really appreciate your script. It partitially worked but only gets 10 songs from this url http://www.myspace.com/tmaturo. I imagine this is a setup thing but if you have time to help get the rest of the albums that would be great. Thanks.
Télécharger les musiques de MySpace (2) ! | Blog de Basile Bruneau
Télécharger les musiques de MySpace (2) ! | Blog de Basile Bruneau
I have edited the script and it work again :)!
You can download it here: http://projets.ntag.fr/dlmyspace/script/versions/dl.php
NTag – thanks!! I tried it today and your modified script works on Debian 6 x86 :))
And thanks Luka for coming up with a way to RIP the music, not record it!
./myspace-dl.sh http://www.myspace.com/seeniseemudMySpace music downloader by http://360percents.com & http://ntag.fr
[+] Requesting http://www.myspace.com/seeniseemud
[-] Trying second method for userID
[+] ERROR: userid is empty!
[-] This is common when a change in MySpace occurs, or if this artists page is configured in a non usual way.
[-] See http://360percents.com/posts/linux-myspace-music-downloader/ or http://projets.ntag.fr/dlmyspace/ for more info.
Neither of these scripts are working for me at the moment. When I try to download music from, eg. kirapurumusic, or squidsquadband, I end up with one flv file for each song, which is completely empty (0 bytes). Anyone know what might be wrong here?
Sorry, the scripts are currently not working, I hope we will find time to fix them.
Would it make more sense to post support requests on the github issue tracker? Seems like a more useful place for it – issue trackers are much more grokable than blog comment threads for this kind of stuff…
SUPERB! This works! “C’est terrible!” as you French guys say. (No it does not mean “terrible”; but the contrary: “fantastic”, “great”)
Thank you so much…
btw this blog software sucks…you can never see whom you are replying to…this “SUPERB…” post was for the user NTag who improved the original script…
Men’s Ugg ” booties “: Men always look in front of you for casual style, ease and simplicity. 3)Rub the solution on your boot with the sponge gently and evenly until it foams. Angela Daley binds the boot and adds the finishing details.
Valuable information. Lucky me I found your web site by accident,
and I am shocked why this twist of fate did not took place in advance!
I bookmarked it.
Greetings,
How to fetch $artistname by only $userid ?
Another way for this ~#50 line:
artistname=`echo “$page” | grep ‘og:title’ | sed -e ‘s/.*property=”og:title” content=”//’ -e ‘s/”.*//’ | head -n 1`
?
I enjoy what you guys are usually up too. This kind of clever work and reporting!
Keep up the good works guys I’ve incorporated you guys to my personal blogroll.
Also visit my blog post: marijuana testing
Remarkable! Its truly amazing paragraph, I have got much clear idea about from this piece of writing.
Wow, incredible blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your web site is great,
as well as the content!