-
Open Wireshark, start a new Capture, filter by "http.cookie"
-
Open iTunes and play the Festival show you want
-
Look for "/auth/" items in your capture list. You need these to continue:
- The full URL of the .m3u8 you want
- The cookie associated with it
-
Split the URL up as per the example below, fill-in the "path" "input", and "output" variables at the top of the script
-
Fill-in the "cookie" variable too
-
Run the script, play the waiting game
-
-
Save shuckster/9575227 to your computer and use it in GitHub Desktop.
Download iTunes Festival streams
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Download iTunes Festival streams | |
# | |
# 1. Open Wireshark, start a new Capture, filter by "http.cookie" | |
# | |
# 2. Open iTunes and play the Festival show you want | |
# | |
# 3. Look for "/auth/" items in your capture list. | |
# You need these to continue: | |
# | |
# a. The full URL of the .m3u8 you want | |
# b. The cookie associated with it | |
# | |
# 4. Split the URL up as per the example below, fill-in the "path" | |
# "input", and "output" variables at the top of the script | |
# | |
# 5. Fill-in the "cookie" variable too | |
# | |
# 6. Run the script, play the waiting game | |
# | |
# | |
# Example URL: | |
# | |
# http://streaming.itunesfestival.com/auth/farm6/vod/20140313/v1/8500_256/133036_soundgarden_vod.m3u8 | |
# | |
path="http://streaming.itunesfestival.com/auth/farm6/vod/20140313/v1/8500_256/" | |
input="133036_soundgarden_vod.m3u8" | |
output="soundgarden.ts" | |
cookie="" | |
cache="/tmp/playlist.m3u8" | |
curl -b "$cookie" "$path$input" > "$cache" | |
playlist=`cat "$cache"` | |
# Download | |
for next_line in $playlist; do | |
if [[ "$next_line" =~ "act" ]]; then | |
# Trim | |
filename=`echo $next_line` | |
echo "Downloading: $filename" | |
curl -s -b "$cookie" "$path$filename" > $filename | |
fi | |
done | |
# Build | |
echo "Building: $output" | |
rm "$output" | |
touch "$output" | |
for next_line in $playlist; do | |
if [[ "$next_line" =~ "act" ]]; then | |
# Trim | |
filename=`echo $next_line` | |
cat "$filename" >> "$output" | |
mv "$filename" /tmp | |
fi | |
done | |
echo "Created: $output" | |
echo "Working files were moved to /tmp if you still want them" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can't get this to work. I've got an Apple Music Festival stream and Wireshark gives me this:
What exactly is the "cookie" you need to fill in the script? I tried
ea161b0dd2ed355fe463b4e8d21e09b5
but that didn't do anything. The script just stops after a few seconds and doesn't download anything.