Пример #1
0
	def checkDNI(self, id):	
		google_results = Google.search("DNI "+str(id))
		for result in google_results:
			name = self.extractName(result)
			if name is not False:
				print id, name
				return name
		return False
Пример #2
0
    def checkDNI(self, id):
        """ base method: search for a DNI in google and try to extract a full name. """
        google_results = Google.search("DNI " + str(id))

        # check all the pages returned by google and try to extract full names with simple rules
        for result in google_results:
            name = self.extractName(result)
            if name is not False:
                print id, name
                return name

        return False