whois/parser.py
changeset 104 67a8d95375b6
parent 103 9b79ce8f9829
child 110 1e59f3be6a11
equal deleted inserted replaced
103:9b79ce8f9829 104:67a8d95375b6
   124         for attr, regex in list(self._regex.items()):
   124         for attr, regex in list(self._regex.items()):
   125             if regex:
   125             if regex:
   126                 values = []
   126                 values = []
   127                 for value in re.findall(regex, self.text, re.IGNORECASE):
   127                 for value in re.findall(regex, self.text, re.IGNORECASE):
   128                     value = value.strip()
   128                     value = value.strip()
   129                     if value and isinstance(value, basestring):
   129                     if value and isinstance(value, basestring) and not value.isdigit():
   130                         # try casting to date format
   130                         # try casting to date format
   131                         value = cast_date(
   131                         value = cast_date(
   132                             value,
   132                             value,
   133                             dayfirst=self.dayfirst,
   133                             dayfirst=self.dayfirst,
   134                             yearfirst=self.yearfirst)
   134                             yearfirst=self.yearfirst)