Python 3 updates

This commit is contained in:
Alexandre Dulaunoy 2014-09-04 18:49:42 +02:00
parent 237dd6bd91
commit af61175807

View file

@ -268,20 +268,20 @@ class Extract:
if __name__ == "__main__": if __name__ == "__main__":
c = 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 abc.dontexist", nameservers=['127.0.0.1']) c = 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 abc.dontexist", nameservers=['127.0.0.1'])
print c.potentialdomain() print (c.potentialdomain())
print c.potentialdomain(validTLD=True) print (c.potentialdomain(validTLD=True))
print c.validdomain(extended=True) print (c.validdomain(extended=True))
print "US:" print ("US:")
print c.localizedomain(cc='US') print (c.localizedomain(cc='US'))
print "LU:" print ("LU:")
print c.localizedomain(cc='LU') print (c.localizedomain(cc='LU'))
print "BE:" print ("BE:")
print c.localizedomain(cc='BE') print (c.localizedomain(cc='BE'))
print "Ranking:" print ("Ranking:")
print c.rankdomain() print (c.rankdomain())
print "List of ip addresses:" print ("List of ip addresses:")
print c.ipaddress(extended=False) print (c.ipaddress(extended=False))
print "Include dot.lu:" print ("Include dot.lu:")
print c.include(expression=r'\.lu$') print (c.include(expression=r'\.lu$'))
print "Exclude dot.lu:" print ("Exclude dot.lu:")
print c.exclude(expression=r'\.lu$') print (c.exclude(expression=r'\.lu$'))