Infinite-Coder-001 / Hotlist-API

This repository downloads data from Khan Academy hotlist. You can easily access it from any KA sketch.
MIT License
5 stars 0 forks source link

Even faster update, caching solution, less wight on jsdelivr's servers #4

Open Reginald-Gillespie opened 1 year ago

Reginald-Gillespie commented 1 year ago

Vexcess sent me this: image https://ka-hearth.learnerpages.com/posts/custom-audio

We could store data in thumbnails, and extract it. That would save working with timestamps, cache, and all that. Since jsdelivr is free it's best not to abuse their services too much.

Infinite-Coder-001 commented 1 year ago

I'm currently working on this. I already solved auth issues. Now, I'm trying to load the image, but I'm getting this error: execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

It's the error, that you were talking about. I'm loading the image, then displaying it on a canvas and then I call ctx.getImageData(0, 0, canvas.width, canvas.height); to load imageData, but it throws the error. I tried setting crossOrigin to anonymus, but it didn't work :(

Reginald-Gillespie commented 1 year ago

Yeah, I was getting that too, no idea how to get around it. One idea vexcess gave was see if there are metadata fields that you could store the info in to extract it - either using the Audio api or image or whatever else

Infinite-Coder-001 commented 1 year ago

I think there's no way around it :( I'll have to upload everything on Github and use Jsdelivr. I don't know where to find metadata fields. What is it?

And see this in Github actions: image I can't use actions. Do I have to send a message to Github or what do I do?

Reginald-Gillespie commented 1 year ago

Not sure, I'll look into it when I have time.

Oh that's weird. Maybe it's until end of the month, maybe they think you're abusing it. I'd follow what they said and email them. This is one reason why GAS is better =P Also, if you had an raspberry pi or something you could run your updater program locally without worrying about quotas.