stirante / facaccimo

A manager for cubari gist sources
https://stirante.com/facaccimo/index.html
40 stars 8 forks source link

Unable to parse Reddit Gallery #26

Closed crackheadakira closed 2 years ago

crackheadakira commented 2 years ago

Currently I'm trying to do this on Firefox, so I'm unsure if it's just a browser-specific issue or in general. Basically what is happening is when I insert the Reddit URL and click Import, an error pops up in the console related to CORS. Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cors.stirante.com/https://IMAGINEURLHERE.json. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.

stirante commented 2 years ago

Should be fixed in https://github.com/stirante/facaccimo/commit/14763f1dda53ea11ffbfd2758847b1197ca45386

The issue was that:

  1. CORS proxy I used disallowed anything, that wasn't git related, so proxy for Reddit wasn't working
  2. Reddit likes to return 'Too Many Requests' when not sending User-Agent header

If it's still broken, let me know and I'll reopen the issue and try fixing it again (but it works for me)

crackheadakira commented 2 years ago

Thanks, it worked perfectly! Whilst the service was not working I saw it as a learning experience, and ended up making my self my own reddit gallery parser that half works for this project, so I guess I ought to thank you for that too!