Skip to content

Instantly share code, notes, and snippets.

@badboy
Last active March 24, 2018 00:17
Show Gist options
  • Save badboy/3732084 to your computer and use it in GitHub Desktop.
Save badboy/3732084 to your computer and use it in GitHub Desktop.
iTunes Festival - Download recordings
  1. Get your cookie. Either proxy your iPhone/iPod/iPad and record the cookie using the proxy server of your choice or capture the request using your AP with Wireshark or similar
  2. Make sure you have a cookie like AKCNTYPE=WIFI; AKID=abc; token=expires... and put it in ~/cookie
  3. Find the name and day of the artist you want to load, replace whitespace with underscores.
  4. Launch the script: ./itunes-festival.sh day artist
  5. Have fun.

and because I'm not the creator of this script: henne war's!

#!/bin/bash
cookie=$(cat ./cookie)
tag=$1
artist=$2
mkdir -p $artist
cd $artist
index=$(curl -s -b "$cookie" http://streaming.itunesfestival.com/auth/eu6/vod/201309$tag/v3/${artist}_desktop_vod.m3u8 | tail -n1)
files=$(curl -s -b "$cookie" http://streaming.itunesfestival.com/auth/eu6/vod/201309$tag/v3/$index)
for i in $files; do
if [[ "$i" =~ "fileSeq" ]]; then
curl -b "$cookie" http://streaming.itunesfestival.com/auth/eu6/vod/201309$tag/v3/8500_256/$i > $i
fi
done
cat fileSequence* > $artist.ts
mv $artist.ts ../
cd ..
rm -r $artist
@JeroenSack
Copy link

The problem is that there is a code just before ${artist} this year, you will have to log it with wireshark and then put it in. And take away head -n5, then it will automatically go to 8500 quality.

@matphillips
Copy link

I did notice that and now I'm not sure how I couldn't get it working.
Anyway, change the date to 201309, add a "v1" to each address just after the date and call it with the secret number before the artist and it works perfectly.

I'm not sure how to revise the script here so I'll avoid doing it so as not to break anything.
Cheers.

@badboy
Copy link
Author

badboy commented Sep 8, 2013

Thank you, updated the script. Now I just need to find a good way to get the "magic artist number"

@petesahatt
Copy link

The URL http://streaming.itunesfestival.com/../v3/.. doesn't seem to be valid for all streams. The QOTSA stream has v1 instead of v3. Thanks for this little, powerful script anyways!

@JeroenSack
Copy link

magic artist number is actually the artist ID and can be found via this link https://itunes.apple.com/search?term="artist"&country=US or all info including link can be found here where the ID can be found under adamID http://app.itunesfestival.com/v6/2013/us.json.

@Julian1984
Copy link

Will it work for 2014? Any change?

@betrisey
Copy link

betrisey commented Sep 2, 2014

I have updated the script for 2014. I've tested for Deadmau5.
https://gist.github.com/samuelbe/610ab99d67a302ddf3c3

@wiill
Copy link

wiill commented Jul 16, 2015

hi @betrisey, seems your link is dead... any chance you still have the script available somewhere?
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment