mirror of
https://github.com/adulau/DomainClassifier.git
synced 2024-12-23 00:55:58 +00:00
Test extended to show the use of localizedomain
This commit is contained in:
parent
542c53dcca
commit
9f4ae469d9
1 changed files with 9 additions and 2 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue