# -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE

from ooni.templates import httpt
class MyIP(httpt.HTTPTest):
    inputs = ['https://check.torproject.org']
    def processResponseBody(self, body):
        print "FOOOO"
        import re
        regexp = "Your IP address appears to be: <b>(.+?)<\/b>"
        match = re.search(regexp, body)
        try:
            self.report['myip'] = match.group(1)
        except:
            self.report['myip'] = None


Add test to obtain the clients IP address via check.tpo