5

I am about to complete a course, for which 35+ files were uploaded to Piazza

Is there a way to download all the lecture notes and general resources, or do I need to manually download each of them?

2

I found a solution that is based on a Bash script.

If you use Link Klipper (Chrome extension) you can create a txt file with all the links containing get_resource.

Then you can run this script:

for path in $(cat piazza.txt)
do
    filename=$(curl -I $path | grep Location | awk '{ print $2 }' | cut -d'?' -f1 | cut -d'/' -f7)
    curl -L $path > $filename

done

Just rename the text file to piazza.txt or change it in the script.

0

If your login uses MFA then it's a little more complicated. You can do it pretty easily with with Chrome like this.

  • Login to site with Chrome
  • Open Developer Tools and go the the Network Tab
  • Go to the page listing your files
  • Right click on the Name of the top level page you just opened
  • Select "Copy as CuRL"
  • Use this as a template for the "curl" command that @Snæbjörn Valur Lilliendahl gave

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.