[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit fdc31f2ed9fedba8a8f534e30aaef937bcfdb9f1
Author: aagbsn <aagbsn@xxxxxxxx>
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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits