[tor-commits] [ooni-probe/master] Remove maxmind; requires javascript now

art at torproject.org art at torproject.org
Tue Dec 3 17:09:39 UTC 2013


commit fdc31f2ed9fedba8a8f534e30aaef937bcfdb9f1
Author: aagbsn <aagbsn at extc.org>
Date:   Fri Nov 22 19:09:48 2013 +0000

    Remove maxmind; requires javascript now
---
 ooni/geoip.py |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/ooni/geoip.py b/ooni/geoip.py
index 7544af5..8ad124c 100644
--- a/ooni/geoip.py
+++ b/ooni/geoip.py
@@ -100,14 +100,6 @@ class TorProjectGeoIP(HTTPGeoIPLookupper):
         probe_ip = re.search(regexp, response_body).group(1)
         return probe_ip
 
-class MaxMindGeoIP(HTTPGeoIPLookupper):
-    url = "https://www.maxmind.com/en/locate_my_ip"
-
-    def parseResponse(self, response_body):
-        regexp = '<span id="my-ip-address">((\d+\.)+(\d+))</span>'
-        probe_ip = re.search(regexp, response_body).group(1)
-        return probe_ip
-
 class ProbeIP(object):
     strategy = None
     address = None
@@ -115,8 +107,7 @@ class ProbeIP(object):
     def __init__(self):
         self.tor_state = config.tor_state
         self.geoIPServices = {'ubuntu': UbuntuGeoIP,
-            'torproject': TorProjectGeoIP,
-            'maxmind': MaxMindGeoIP
+            'torproject': TorProjectGeoIP
         }
 
     @defer.inlineCallbacks





More information about the tor-commits mailing list