Skip to content

Function my_finds() stops at premium cache #117

@S0S-90

Description

@S0S-90

When I try to get all my found caches with the function my_finds() the generator stops at a cache that can only be seen by premium members. (I'm not a premium member, so when I found the cache, it wasn't premium but now it is.) However it would be nice to at least see the caches found before the premium cache if not also the information about the premium cache that is available.

I think the problem is in the function my_logs() of the Geocaching class where it yields the cache by calling yield self.get_cache(guid=guid) as loading by guid does not work for premium caches. I would suggest catching this exception here and do "normal loading" of the cache, i.e. by get_cache(wp).

In order to do this the GC code (wp) has to be parsed from the website. I haven't tried that yet but I wrote a quickfix where it just returns a string when the PMOnlyException is thrown.

So the end of the my_logs() function looks like that:

try:
    yield self.get_cache(guid=guid)
except PMOnlyException:
     # better: yield self.get_cache(gccode)
    yield "PMOnlyException"
yielded += 1

If I find the time I will try to get a better solution.

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