ThaTiemsz / Discord-Emoji-Downloader

Get all emojis from a server in a ZIP file.
https://thatiemsz.github.io/Discord-Emoji-Downloader
424 stars 85 forks source link

cross origin request blocked #48

Open goldstargloww opened 4 months ago

goldstargloww commented 4 months ago

the thing won't do the thing anymore

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://discord.com/api/v10/users/@me/guilds. (Reason: CORS request did not succeed). Status code: (null).
Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.
    <anonymous> https://thatiemsz.github.io/Discord-Emoji-Downloader/index.a4aa343c.js:2
    AsyncFunctionThrow self-hosted:803
    (Async: async)
    dispatch https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    handle https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    (Async: EventListener.handleEvent)
    add https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    Te https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    each https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    each https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    Te https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    on https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    t https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    <anonymous> https://thatiemsz.github.io/Discord-Emoji-Downloader/index.a4aa343c.js:2
    l https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    c https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    (Async: setTimeout handler)
    a https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    u https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    fireWith https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    fire https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    u https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    fireWith https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    ready https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    _ https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    (Async: EventListener.handleEvent)
    <anonymous> https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    <anonymous> https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
    <anonymous> https://thatiemsz.github.io/Discord-Emoji-Downloader/index.abc02158.js:1
NanashiTheNameless commented 2 months ago

you can try the version from PR https://github.com/ThaTiemsz/Discord-Emoji-Downloader/pull/51 (broken for an unrelated reason, seems manual version is the only option at this time) or my "personal preference version" https://github.com/NanashiTheNameless/Discord-Emoji-Downloader you can also use the manual version if you know exactly what server you want

api V10 appears to not work as 6 is still the default V9 does work however

you can use the following curl command for the manual version curl 'https://discordapp.com/api/v9/guilds/<SERVER ID>' --compressed -H 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.3' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Referer: https://discord.com/app' -H 'Authorization: <TOKEN>'

edit: V10 Does work, but with https://discord.com/api/v10/ and not https://discordapp.com/api/v10/