@@ -411,6 +411,8 @@ def load(domain: str, text: str):
411411 return WhoisLv (domain , text )
412412 elif domain .endswith (".co" ):
413413 return WhoisCo (domain , text )
414+ elif domain .endswith (".ga" ):
415+ return WhoisGa (domain , text )
414416 else :
415417 return WhoisEntry (domain , text )
416418
@@ -3462,6 +3464,28 @@ def __init__(self, domain: str, text: str):
34623464 else :
34633465 WhoisEntry .__init__ (self , domain , text , self .regex )
34643466
3467+ class WhoisGa (WhoisEntry ):
3468+ """Whois parser for .ga domains"""
3469+
3470+ regex : dict [str , str ] = {
3471+ "domain_name" : r"Nom de domaine: *(.+)" ,
3472+ "registrant_name" : r"\[HOLDER\]\r\nID Contact:.+\r\nType:.+\r\nNom:\s+(.*)" ,
3473+ "registrant_address" : r"\[HOLDER\]\r\nID Contact:.+\r\nType:.+\r\nNom:\s+.*\r\nAdresse:\s+(.*)" ,
3474+ "tech_name" : r"\[TECH_C\]\r\nID Contact:.+\r\nType:.+\r\nNom:\s+(.*)" ,
3475+ "tech_address" : r"\[TECH_C\]\r\nID Contact:.+\r\nType:.+\r\nNom:\s+.*\r\nAdresse:\s+(.*)" ,
3476+ "registrar_name" : r"Registrar: +(.+)" ,
3477+ "name_servers" : r"Serveur de noms: +(.+)" ,
3478+ "creation_date" : r"Date de création: +(.+)" ,
3479+ "updated_date" : r"Dernière modification: +(.+)" ,
3480+ "expiration_date" : r"Date d'expiration: +(.+)"
3481+ }
3482+
3483+ def __init__ (self , domain : str , text : str ):
3484+ if "%% NOT FOUND" in text :
3485+ raise WhoisDomainNotFoundError (text )
3486+ else :
3487+ WhoisEntry .__init__ (self , domain , text , self .regex )
3488+
34653489
34663490class WhoisCo (WhoisEntry ):
34673491 """Whois parser for .co domains"""
@@ -3471,3 +3495,4 @@ def __init__(self, domain, text):
34713495 raise WhoisDomainNotFoundError (text )
34723496 else :
34733497 WhoisEntry .__init__ (self , domain , text , self .regex )
3498+
0 commit comments