Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Handle rate limiting, refactor main.py #52

Merged
merged 3 commits into from
Feb 5, 2023

Conversation

DjordyKoert
Copy link
Contributor

This PR will add:

  • Handling for rate limit during login
  • Exceptions can now be found inside their own directory Exceptions/
  • Refactor main.py:
    • Prevent file from being imported inside
    • Seperate initialization & main program logic (init() & main() methods)
    • Move logic for exception handling (KeyboardInterrupt, SystemExit, CapsuleFarmerEvolvedException)

@alepouna alepouna added the enhancement New feature or request label Feb 4, 2023
@heliagg
Copy link
Contributor

heliagg commented Feb 4, 2023

LGTM. Good PR

@alepouna
Copy link
Collaborator

alepouna commented Feb 4, 2023

Nice. I like the exceptions folder. Should merge this before working on #43 so there isn't conflicts.

@TheFeelTrain
Copy link

I tried running this branch to see if it helps with #50 but had the same problem as before. Looks like it did catch the 403 a few times but still eventually exited. Ran in debug mode this time.

capsulefarmer-2023-02-04.log

@DjordyKoert
Copy link
Contributor Author

I tried running this branch to see if it helps with #50 but had the same problem as before. Looks like it did catch the 403 a few times but still eventually exited. Ran in debug mode this time.

capsulefarmer-2023-02-04.log

This PR will not help with that issue. It handles rate limits (code 429). The issue u mentioned is a problen with code 403 and has to be fixed in a different PR.

@TheFeelTrain
Copy link

Ohh alright. I guess that's why you deleted your comment. I just saw it from the email notification so I thought it was worth a shot.

@LeagueOfPoro
Copy link
Owner

Looks good, nice PR. Merging.

@LeagueOfPoro LeagueOfPoro merged commit b0d849d into LeagueOfPoro:master Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants