Skip to content

Instantly share code, notes, and snippets.

@leath-dub
Last active January 18, 2023 14:30
Show Gist options
  • Save leath-dub/239732f4a067643c6fd770d4713ec2f3 to your computer and use it in GitHub Desktop.
Save leath-dub/239732f4a067643c6fd770d4713ec2f3 to your computer and use it in GitHub Desktop.
Minimal curl command for fetching past papers for dcu.guruarchive.com
#!/bin/sh
curl -d '{"from":0,"size":20,"sortField":"year","sortOrder":"DESC","search":{"documentType":"exam-paper","moduleCode":null,"school":null,"year":null,"author":null,"semester":null,"query":"ca117","programme":null}}' \
-H "authority: api.gurudevelopments.com" \
-H "method: POST" \
-H "path: /search/archive" \
-H "scheme: https" \
-H "accept: application/json" \
-H "accept-language: en-GB,en-US;q=0.9,en;q=0.8" \
-H "content-length: 204" \
-H "content-type: application/json" \
-H "origin: https://dcu.guruarchive.com" \
-H 'sec-ch-ua: "Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"' \
-H "sec-ch-ua-mobile: ?0" \
-H 'sec-ch-ua-platform: "Linux"' \
-H "sec-fetch-dest: empty" \
-H "sec-fetch-mode: cors" \
-H "sec-fetch-site: cross-site" \
-H "tenant: dcu" \
-H "user-agent: Mozilla/5.0 AppleWebKit (KHTML, like Gecko)" https://api.gurudevelopments.com/search/archive
# ^^^ yeah you need to add this specific user agent lmao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment