Provides a tool to download all resources linked in the Piazza resources panel.
Jan 6, 2021
the rules for parsing resource links and names are updated to keep up with the latest Piazza.
-
Python
, works with either 2 or 3. -
Requests
, which is a handy library to handle http operations. It can be installed via different ways.Using pip:
pip install requests
Using anaconda:
conda install -c anaconda requests
- Clone the repository.
git clone https://github.com/tianjiaoding/piazza-downloader-NG.git
-
Go to Piazza resources page where all the resources can be dowloaded.
-
In your broswer, excute the Javascript code
fetch_urls_and_names.js
that is in the repository.- For example, if you are using Chrome, press
F12
and go to theConsole
tab. If you are using Firefox, got toDeveloper > Debugger
and thenConsole
. - Copy and paste the aforementioned code, then press
Enter
.
- For example, if you are using Chrome, press
-
You should see outputs in your console with links and with names. Put links in
resources_links.txt
, and put names inresources_names.txt
. Replace the existing ones if you like. -
Edit your login details in the Python code, and execute it.
cd piazza-downloader-NG
python get_resources_files.py
This work is based on warmspringwinds
's repository. However, the original version is no longer being maintained and not functional in many cases, e.g., when login is required, or the link contains newline symbol. This work aims at fixing those problems and providing a working tool.