hfaran / piazza-api

Unofficial Client for Piazza's Internal API
https://hfaran.github.io/posts/reverse-engineering-piazzas-api/
MIT License
186 stars 52 forks source link

Resources Pages #70

Open mrnhtyzgld opened 4 months ago

mrnhtyzgld commented 4 months ago

I am trying to make a script that automatically fetches the resources of the given class. I was able to use your api for the most parts, but there is no resources support. Why is that? I am new to api stuff so i don't really get it. I read your article but i guess resources pages' http commands doesn't show(i guess?). After that i tried the solve this and I find the layout of the html tags of the each resources link, their name and their folder title so if i were to download the html of resources page after logging in i can find them. But of course i dont want to download that i just want to make it happen with request, bs4 etc. GPT said js cant be fetched with them but they are not js so i believe we can make this the unofficial api's part. I tried but struggle to make it happen. Can you give me some insight about it? Maybe we can add resource feature to this api together.

hfaran commented 4 months ago

Scraping the HTML of the resources page for the class should work and from the table you can get the links and download them all. Unfortunately I don't have time to help you with this, but if you spend more time on this yourself, you should be able to figure this out.

mrnhtyzgld commented 3 months ago

Thanks! I tried but I will try again, if I encounter another problem I will write here.