Skip to content

Instantly share code, notes, and snippets.

@PyYoshi
Forked from tdragonite/HOWTO.md
Last active August 29, 2015 14:06
Show Gist options
  • Save PyYoshi/85db0a8cd364accd93fe to your computer and use it in GitHub Desktop.
Save PyYoshi/85db0a8cd364accd93fe 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 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.

Working for iTunes Festival September 2014. Also on OS X. Tnx to the original creator!

#!/bin/bash
# iTunes Festival 2014 - Show Downloader
# Variables
cookie=$(cat ./cookie)
tag=$1
artist=$2
counter=1
show=(${artist//_/ })
output=${show[1]}_itf${tag}092014.mp4
# Making temp directory
mkdir -p $artist
cd $artist
# Fetching parts links
echo "iTunes Festival 2014 - Start download of ${artist} show ($tag/09/2014)"
index=$(curl -s -b "$cookie" http://streaming.itunesfestival.com/auth/eu6/vod/201409$tag/v1/${artist}_desktop_vod.m3u8 | tail -n1)
files=$(curl -s -b "$cookie" http://streaming.itunesfestival.com/auth/eu6/vod/201409$tag/v1/$index)
# Download parts
for i in $files; do
if [[ "$i" =~ "song" ]]; then
echo "Downloading: $i"
curl -b "$cookie" http://streaming.itunesfestival.com/auth/eu6/vod/201409$tag/v1/8500_256/$i > $counter.ts
counter=$((counter+1))
fi
done
# Merging parts and move in parent directory
echo "Building: $output"
cat $( ls -1 *.ts | sort -n ) > $output
mv $output ../
cd ..
rm -r $artist
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment