Test extended to show the use of localizedomain

This commit is contained in:
Alexandre Dulaunoy 2012-01-24 11:49:07 +01:00
parent 542c53dcca
commit 9f4ae469d9

View file

@ -1,5 +1,12 @@
import domainclassifier 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.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')