Skip to content

Instantly share code, notes, and snippets.

@betrisey
Last active December 10, 2020 01:27
Show Gist options
  • Save betrisey/610ab99d67a302ddf3c3 to your computer and use it in GitHub Desktop.
Save betrisey/610ab99d67a302ddf3c3 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 token=expires=1409714101~access=/auth/*~md5=2d4466c1...

  3. Find the day of the artist you want to load (e.g. 01, 02, 10, 25) Find the artist on iTunes https://itunes.apple.com/us/artist/*deadmau5*/id*78011850* and take its ID and its name. Add an underscore between these two. (e.g. 78011850_deadmau5)

  4. Launch the script: sh itunes-festival.sh cookie day id_artist

    sh itunes-festival.sh "token=expires=1409714101~access=/auth/*~md5=2d4466c1" 01 78011850_deadmau5

  5. Have fun.

#!/bin/bash
cookie=$1
day=$2
artist=$3
mkdir -p $artist
cd $artist
index=$(curl -s -b "$cookie" http://streaming.itunesfestival.com/auth/eu1/vod/201409$day/v1/${artist}_desktop_vod.m3u8 | tail -n1)
files=$(curl -s -b "token=expires=1409714101~access=/auth/*~md5=2d4466c113b2eb5f10b0ea4ab55df617" http://streaming.itunesfestival.com/auth/eu1/vod/201409$day/v1/$index)
for i in $files; do
if [[ "$i" =~ ".ts" ]]; then
curl -b "$cookie" http://streaming.itunesfestival.com/auth/eu1/vod/201409$day/v1/8500_256/$i > $i
fi
done
cat * > $artist.ts
mv $artist.ts ../
cd ..
rm -r $artist
@slinkdot
Copy link

slinkdot commented Sep 6, 2014

Hi guys, complete novice here so apologies...

Can someone give me a step by step approach to doing this. I have Wireshark and can locate the cookie for the Kasabian gig last night, but anything after that I have no idea.

How do I write a script?
Is it PC-based (I have a Win7 machine and a Macbook Pro...)

I'd be eternally grateful if someone could give me a beginner's guide :)

Thanks in advance...

@tdragonite
Copy link

@titania424 I've created this one for me, because I've the same problem of wrong order in the final output when I've tried to adapt the original script with 2014 festival.
https://gist.github.com/tdragonite/b084d4af4beefbde7ef9
Ah, and you don't need to obtain manually the cookie :-)

@liudayu
Copy link

liudayu commented Sep 8, 2014

can anyone please help me, i really want download calvin harris' show... but i dont know how to do it and i have almost all assignments & exams due this week... please help
can someone make the sh file for me or the download link..
thank you

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