Skip to content

Login at geocaching.com doesn't work anymore #162

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

Closed
CachingFoX opened this issue Apr 23, 2021 · 5 comments · Fixed by #163
Closed

Login at geocaching.com doesn't work anymore #162

CachingFoX opened this issue Apr 23, 2021 · 5 comments · Fixed by #163

Comments

@CachingFoX
Copy link
Contributor

After Groundspeak change page structure, login method raise an error. The page header are build up dynamically and Geocaching.get_logged_user() doesn't find the user name.

A very quick and dirty hack will be

        def get_logged_user(self, login_page=None):
...
        logging.debug("Checking for already logged user.")
        s = login_page.find_all("script")
        for i in s:
            m = re.search(r'"username":."(.*)"', str(i))
            if m:
                return m[1]

        return None
@CachingFoX
Copy link
Contributor Author

👍 looks much better than my solution (a late in the night quick'n'dirty workaround)! Thanks!

@CachingFoX
Copy link
Contributor Author

Any updates about this issue?

@FriedrichFroebel
Copy link
Collaborator

PR #163 should fix this issue, but there still is one failing test. I did not yet have the time to look into this, so if you have an idea about a possible fix of this test, feel free to propose a fix here or in the PR to allow a merge.

@tomasbedrich
Copy link
Owner

Fixed in 4.2.2. Please try and let us know eventually.

@CachingFoX
Copy link
Contributor Author

Thank you very much - log in with 4.2.2 works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants