tomasbedrich / pycaching

A Python 3 interface for working with Geocaching.com website.
https://pycaching.readthedocs.io/
GNU Lesser General Public License v3.0
61 stars 46 forks source link

Archive Log Type Can Be 5 or 6 #234

Closed GeoTime61 closed 7 months ago

GeoTime61 commented 7 months ago

I tried to process a cache, but got an error: Unknown log type '6'. It appears that there are two possible Archive log types - 5 or 6. The simple program below shows the error. GC code GCHK3P works fine. GCADFC fails with the log type '6' error. It looks like log.py can handle two different IDs for a single log type. Is it as simple as adding '6' to from_filename()?

import pycaching

geocaching = pycaching.login()

cache = geocaching.get_cache("GCHK3P")  # Archive type 5
print(cache.found)

cache = geocaching.get_cache("GCADFC")  # Archive type 6
print(cache.found)  # Fails with "pycaching.errors.ValueError: Unknown log type '6'."

geocaching.logout()
FriedrichFroebel commented 7 months ago

Feel free to open a corresponding PR.