Snapchat "Memories" Fetcher
In compliance with the California Consumer Privacy Act of 2018 (โCCPAโ), businesses which collect and store user data must allow customers the ability to request data the company has collected about the requesting user:
"... you may ask businesses to disclose what personal information they have about you and what they do with that information, to delete your personal information and not to sell your personal information. You also have the right to be notified, before or at the point businesses collect your personal information, of the types of personal information they are collecting and what they may do with that information."
Many businesses (such as Snapchat) begrudgingly comply by "technically" allowing users to do this, but in such as way that is impossible for a human to parse. While Snapchat technically allows users to request photos and videos Snapchat has stored (dubbed "Memories"), they do so in a way which is unusable by human beings. Sparing the technical details, exporting your account's memories is hidden behind a convoluted process of clicking individual URLs, which serve as proxies to reveal actual URLs containing your data.
The workflow Snapchat is intending to implement is unreasonable. To claim a single media file which belongs to you, users are expected to individually click URLs one-by-one. In reality, these URLs simply link to other URls, which will eventually fetch a single media file of the user. For context, by account has over 3500 media files.
Snapchat's practice of intentionally complicating this process is of questionable legality, and surely an act of defiance. This script automates the process of max-exporting media from Snapchat data exports to resolve this issue in the meantime while the questionable legality of Snapchat's practices are persued.
Getting Started
Requesting your data
- User data can be requested from Snapchat here.
- Under Manage My Account, select My Data.
- Your data export will be emailed to you as a .zip file containing the following:
/mydata_1618592678039
โโโ index.html
โโโ /html
โ โโโ *.html
โโโ /json
โโโ *.json
You can explore your exported data via the index.html
page:
Running this script
- Clone this repo (
git clone https://github.com/toddbirchard/snapchat-memory-fetcher.git
). - Drop the contents of your export to the
/export
directory of this repo. - Initialize project with requirements via
make install
. - Run script via
make run
.
Result
- The first time this script is run, it will export decoded URLs extracted from your data into JSON files as
/urls/photos.json
and/urls/videos.json
. Urls only need to be decoded once and can be reused for future fetching. - The script will then save all photos and videos associated with your account to
/downloads/photos
and/downloads/videos
, respectively.
This script utilizes Python concurrency in both decoding URLS and fetching media, and therefore should run quickly. Note your hard drive space available as you may be downloading thousands of uncompressed videos.