My son attends a daycare that uses an app (whose name I'm not mentioning because I'm almost definitely breaking their TOS) where they can upload photos of him, daily reports, etc.
Rather than having to remember to manually save all of those images, I wanted to see if I could write something to do it automatically.
Setup:
- Login to the website.
- Use the Export cookie JSON file for Puppeteer chrome extension to dump your login cookie to
cookies.json
in the root of the project. - Create a .env file with the API base URL as API_BASE_URL. Example:
API_BASE_URL=https://www.domain.com/remote/v1
yarn start
- As it runs, it will create an images directory with a subdirectory for every day, download each image for that day, and set the created date to the correct date (so that when you upload to google photos, they'll show up in the correct place)