Skip to content

pycaching.cache.Cache._from_print_page not working with non-English languages #210

@Jakoma02

Description

@Jakoma02

If the language of the webpage for the geocaching.com account is set to a different language than English, at least some parts of this package do not function correctly. For example, when the language is switched to Czech, the geocaching.my_logs(pycaching.log.Type.found_it, limit) method call raises the exception

    cache_info["summary"] = content.find("h2", text="Short Description").find_next("div").text
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'find_next'

The underlying issue seem to be that the info is parsed from the cache print page, which is retrieved in the language that the webpage UI is set to. For example, in the case of "Short Description" there is the title "Stručný popis" in the czech version instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions