Prechádzať zdrojové kódy

better checking for domains

George C. Privon 8 rokov pred
rodič
commit
139f5a97d5
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      email_stats.py

+ 1 - 1
email_stats.py

@@ -77,7 +77,7 @@ for msg in a:
             senders[dateID] = np.zeros(len(domains) + 1)
         dmatch = False
         for i, domain in enumerate(domains):
-            if not(msg['To'] is None) and re.search(domain, msg['To']):
+            if not(msg['To'] is None) and re.search(domain + '\.', msg['To']):
                 senders[dateID][i+1] += 1
                 dmatch = True
         if not dmatch: