this project was inspired by Snapchat-All-Memories-Downloader by ToTheMax. i wanted to recreate their project in bash because node.js scares me.
snapchat allows you to takeout your data at any time, but it does not actually download your precious memories by default. in the takeout data, they give you a json file filled with download links for each and every one of your snapchat memories. this is not ideal for people who just want to backup all their memories and don't care about the technical data that snapchat gives you. this script reads the memories_history.json
file in the json
folder from your backup and gives you some options depending on what you want to do.
- jq: https://stedolan.github.io/jq/
- wget: https://www.gnu.org/software/wget/
- sed: https://www.gnu.org/software/sed/
# clone repo
git clone https://github.com/tg-z/snap-dl
# cd into repo
cd snap-dl
# add script to path (optional)
cp snap-dl ~/bin
as of right now, the most important function (downloading) is unfinished :/
# follow this guide on how to get snapchat data
open https://support.snapchat.com/en-US/a/download-my-data/
# login to snapchat to request data
open https://accounts.snapchat.com/
# request snapchat data + wait for email with download link + open to download zipfile
open https://accounts.snapchat.com/accounts/downloadmydata/
# move zipfile to current dir + extract it
cp ~/Downloads/mydata*.zip .
# copy 'memories_history.json' file to snap-dl clone directory
cp mydata_*/json/memories_history.json .
# execute script to setup for download
./snap-dl init
# count how many memories you have
./snap-dl count
# download snapchat memories
./snap-dl download