Extract your viewing activity data from Netflix.
Before you start, don't forget to install dependencies with npm install
- Go to https://www.netflix.com/WiViewingActivity
- Make sure you're logged in and can see some activity
- Open your browser developer tools and open the network monitoring
- Scroll the Netflix page to the bottom, requesting more data
- Inspect the network request, you'll be grabbing 3 pieces of data:
- Build number:
api/shakti/<build_number>/viewingactivity
- Secure Netflix Id cookie:
SecureNetflixId
in theCookie
header - Netflix Id cookie:
NetflixId
in theCookie
header
- Build number:
- Create a
.env
file with those three values, under the variable namesBUILD_ID
,SECURE_NETFLIX_ID
andNETFLIX_ID
respectively - Time to get some data - use
npm start
to kick off the script - If it's all working, you'll get an
output
directory created with the raw responses and the viewing activity sliced by day.