aflaag / pokemon-icat

Shows any Pokémon sprite in your terminal!
GNU General Public License v3.0
95 stars 6 forks source link

Url rate limited suring setup_icons.py #1

Closed schmuelio closed 2 years ago

schmuelio commented 2 years ago

Attempting to run setup_icons.py during the install process tends to get rate limited and fail after ~400-500 downloads.

Initial fix was adding:

    if exists(f"{home}/.pokemon-icat/pokemon-icons/{pokemon}.png"):
        print(f"{pokemon} exists already")
        continue

to main loop and running multiple times was a workaround, but a better workaround would likely involve a try/catch around requests.get(url) and sleeping for a little if it fails.

aflaag commented 2 years ago

never had this issue, i'll try to look into this thanks

aflaag commented 2 years ago

although i can't really replicate your issue, based on what you told me, this should be a fix for the problem, let me know

https://github.com/ph04/pokemon-icat/commit/3df5c5930ae3fa4caeed9ff6f7a18b5b9fb2782e#diff-7e0dfd15d2da5456547872192294ce5988802cb857448fffc3c781eb8237544a