takos22 / codingame

Wrapper for the undocumented CodinGame API. Can be used both synchronously and asynchronlously.
https://codingame.readthedocs.io
MIT License
21 stars 7 forks source link

[BUG] Login service not found #5

Closed takos22 closed 2 years ago

takos22 commented 2 years ago

Describe the bug

When logging in to CodinGame API, with Client.login(email, password), a LoginError is raised saying Service not found: codingamer.loginsitev2(3). This means that the endpoint in the API no longer exists, so the login endpoint was changed.

To Reproduce

Steps to reproduce the behavior:

  1. Copy this code to a file (you can replace email and password with your own but that doesn't change anything to the error):
    import codingame
    client = codingame.Client()
    client.login("email@example.com", "password")
  2. Execute the previously copied code.
  3. See error: codingame.exceptions.LoginError: Service not found: codingamer.loginsitev2(3)

Expected behavior

Login works and doesn't raise an error.

Environment information:

Additional context

The login endpoint was moved to CodinGamer/loginSite and now needs a Captcha or a valid session.

takos22 commented 2 years ago

Download version 1.1.0+ to get back login support with the remember_me_cookie parameter, see the docs.