From 9f4ae469d9d8f13f9bb10b694e0e958b52a4fcf1 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Tue, 24 Jan 2012 11:49:07 +0100 Subject: [PATCH] Test extended to show the use of localizedomain --- DomainClassifier/test.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/DomainClassifier/test.py b/DomainClassifier/test.py index 8147c94..e802349 100644 --- a/DomainClassifier/test.py +++ b/DomainClassifier/test.py @@ -1,5 +1,12 @@ import domainclassifier -c = domainclassifier.Extract("this is a text with a domain called test@foo.lu another test abc.lu something a.b.c.d.e end of 1.2.3.4 foo.be") +c = domainclassifier.Extract( rawtext = "this is a text with a domain called test@foo.lu another test abc.lu something a.b.c.d.e end of 1.2.3.4 foo.be www.belnet.be http://www.cert.be/ www.public.lu www.allo.lu quuxtest www.eurodns.com something-broken-www.google.com www.google.lu trailing test") + print c.domain() -print c.validdomain(extended=None) +print c.validdomain(extended=False) +print "US:" +print c.localizedomain(cc='US') +print "LU:" +print c.localizedomain(cc='LU') +print "BE:" +print c.localizedomain(cc='BE')