Download all ClassDojo notes, photos, and videos from your timeline.
NOTE: The original author is kecebongsoft / dedy-purwanto, at https://gist.github.com/dedy-purwanto/6ad1fa7c702981f35f25da780c50914d
This version has several features not present in the original version:
- add group name to the downloaded files (useful for multiple children
create classdojo directory in the current directory if it does not exist- use .env file for storing session cookies and "start" date (NOT_BEFORE) value
- updated README extended on e.g. instructions on how to get session cookies
If you have PDM installed:
# Install dependencies
pdm install
# Run the application
pdm run python main.py# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate # On macOS/Linux
# or
venv\Scripts\activate # On Windows
# Install dependencies
pip install requests python-dotenv
# Run the application
python main.py# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Install dependencies from requirements.txt
pip install -r requirements.txt
# Run the application
python main.py- Python 3.12
- Required packages:
requestsandpython-dotenv - ClassDojo account with access to timeline data
- Create the folder/directory "classdojo_output" in the same folder as this script
- Copy the
.env_templateto.envand add your session cookie values. Check your session cookie by opening ClassDojo in the browser and copy the following cookies (See the section below "Reading Cookies" for more information on how to get the cookies.) :dojo_log_session_id,dojo_login.sid,dojo_home_login.sid
- You will also want to edit NOT_BEFORE to align to the beginning of the school year you want to download.
- Run the script using one of the methods described in the "How to Launch" section above and wait for it to finish.
- Make sure you have a correct session cookies set in this script.
- Make sure you can open the
FEED_URLlisted in this script from within your browser (assuming you can open ClassDojo website)
- Fetch list of items in the timeline, if there are multiple pages, it will fetch for all pages.
- Collect list of URLs for the attachment for each item
- Download the files into local temporary directory, and also save the timeline activity as a json file.
- NOTE: The script presumes most attachments are photos. You will have to rename any video files (usually larger, won't preview correctly) as .mpg instead of .jpg
You can read cookie values in browsers using the following methods:
Method 1: Using the Chrome DevTools
- Open the Chrome browser and navigate to https://home.classdojo.com, log in if you are not already
- Press F12 or right-click on the page and select "Inspect" to open the Chrome DevTools.
- In the DevTools, switch to the "Application" tab.
- Click on the "Cookies" tab.
- You will see a list of cookies set by the webpage. You can expand each cookie to view its values.
Method 2: Using the Chrome Console
- Open the Chrome browser and navigate to https://home.classdojo.com, log in if you are not already
- Press F12 or right-click on the page and select "Inspect" to open the Chrome DevTools.
- In the DevTools, switch to the "Console" tab.
- Type the following command and press Enter:
document.cookie - This will display the entire cookie string.
- You can parse the cookie string to extract the values you need.
Method 3: Using the Brave Browser
- Open the Brave browser and navigate to https://home.classdojo.com, log in if you are not already
- Press F12 or right-click on the page and select "Inspect" to open the Brave DevTools.
- In the DevTools, switch to the "Elements" tab.
- Click on the "Elements" tab and then click on the "Cookies" tab.
- You will see a list of cookies set by the webpage. You can expand each cookie to view its values.
Method 4: Using the Firefox Browser
- Open Firefox and navigate to https://home.classdojo.com, log in if you are not already
- Press CTRL-SHIFT-I or user the ☰ menu, select "More Tools", then "Web Developer Tools" to open DevTools.
- In the DevTools, switch to the "Storage" tab.
- You will see a list of cookies set by the webpage. You can double click on the value of each cookie to copy it.