mirror of
https://github.com/adulau/DomainClassifier.git
synced 2024-11-07 11:56:25 +00:00
Alexandre Dulaunoy
80dc03f59c
To avoid confusion the method name domain() has been renamed to potentialdomain().
19 lines
846 B
Python
19 lines
846 B
Python
import domainclassifier
|
|
|
|
c = domainclassifier.Extract( rawtext = "www.xxx.com 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 www.facebook.com www.nic.ru www.youporn.com 8.8.8.8 201.1.1.1", nameservers = ['149.13.33.69'])
|
|
#print c.potentialdomain()
|
|
print c.validdomain(extended=True)
|
|
print "US:"
|
|
print c.localizedomain(cc='US')
|
|
print "LU:"
|
|
print c.localizedomain(cc='LU')
|
|
print "BE:"
|
|
print c.localizedomain(cc='BE')
|
|
print "Ranking:"
|
|
print c.rankdomain()
|
|
print "List of ip addresses:"
|
|
print c.ipaddress(extended=True)
|
|
print "Include dot.lu:"
|
|
print c.include(expression=r'\.lu$')
|
|
print "Exclude dot.lu:"
|
|
print c.exclude(expression=r'\.lu$')
|