Download all ClassDojo photos and videos in your timeline.
NOTE: The original author is unknown. The docstring mention: kecebongsoft
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
- updated README extended on e.g. instructions on how to get session cookies
- create virtual environment with
requests
andpython-dotenv
packages. You can usepdm
or just pure Python:
# create venv
python3 -m venv venv
# activate
source venv/bin/activate
# install dependencies
pip install requests python-dotenv
-
Use the
.env_template
to create.env
file with session cookie values. Check your session cookie by opening ClassDojo in the browser and copy the following cookies:dojo_log_session_id
,dojo_login.sid
,dojo_home_login.sid
See the section below "Reading Cookies" for more information on how to get the cookies.
-
Run this script 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_URL
listed 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.
You can read cookie values in Chrome and Brave browsers using the following methods:
Method 1: Using the Chrome DevTools
- Open the Chrome browser and navigate to the webpage that sets the cookies.
- 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 the webpage that sets the cookies.
- 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 the webpage that sets the cookies.
- 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.
Remember that cookies are specific to the domain that sets them, so you need to access the cookies from the same domain to read their values.