Skip to content

Instantly share code, notes, and snippets.

@TheMooseHut
Forked from betrisey/itunes-festival.sh
Last active August 29, 2015 14:06
Show Gist options
  • Save TheMooseHut/5307792c4fd0966babd9 to your computer and use it in GitHub Desktop.
Save TheMooseHut/5307792c4fd0966babd9 to your computer and use it in GitHub Desktop.
  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment