Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

IPV6 results returned on database not supporting IPV6 #81

Open
PeterPilley opened this issue Mar 18, 2015 · 0 comments
Open

IPV6 results returned on database not supporting IPV6 #81

PeterPilley opened this issue Mar 18, 2015 · 0 comments

Comments

@PeterPilley
Copy link

When running query for IPV6 against GEOIPCITY maxmind db I am getting results that are from the wrong location, querying maxmind support they state that this database doesnt actually support IPV6.

the database is GeoIP-133_20150317.tar.gz

I am using the current pygeoip installed via pip running on ubuntu

here is a sample output for the code we are using

d = geo_test.get(data removed*)

d

['Hong Kong', 'na', '22.2833', '114.15', '0']

the function actually being used is pretty simple

def get_locale_data(addr):
        locale = locale.record_by_addr(addr)
        if locale:
               _data = [
                        str(locale['country_name']),
                        str("na"),
                        str(locale['latitude']),
                        str(locale['longitude']),

                        ]

                return _data
        else:
                return False
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant