mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-26 15:57:16 +00:00
First version of the DomainClassifier
This commit is contained in:
parent
3055b0deae
commit
246621f663
1 changed files with 5 additions and 2 deletions
|
@ -44,6 +44,9 @@ def main():
|
||||||
subscriber_name = "DomainClassifier"
|
subscriber_name = "DomainClassifier"
|
||||||
subscriber_config_section = "PubSub_Global"
|
subscriber_config_section = "PubSub_Global"
|
||||||
|
|
||||||
|
cc = cfg.get("PubSub_DomainClassifier", "cc")
|
||||||
|
cc_tld = cfg.get("PubSub_DomainClassifier", "cc_tld")
|
||||||
|
|
||||||
sub = ZMQ_PubSub.ZMQSub(configfile, subscriber_config_section, channel, subscriber_name)
|
sub = ZMQ_PubSub.ZMQSub(configfile, subscriber_config_section, channel, subscriber_name)
|
||||||
|
|
||||||
# FUNCTIONS #
|
# FUNCTIONS #
|
||||||
|
@ -71,10 +74,10 @@ def main():
|
||||||
c.text(rawtext=paste)
|
c.text(rawtext=paste)
|
||||||
c.potentialdomain()
|
c.potentialdomain()
|
||||||
c.validdomain(rtype=['A'],extended=True)
|
c.validdomain(rtype=['A'],extended=True)
|
||||||
localizeddomains = c.include(expression=r'\.lu$')
|
localizeddomains = c.include(expression=cc_tld)
|
||||||
if localizeddomains:
|
if localizeddomains:
|
||||||
print (localizeddomains)
|
print (localizeddomains)
|
||||||
localizeddomains = c.localizedomain(cc='LU')
|
localizeddomains = c.localizedomain(cc=cc)
|
||||||
if localizeddomains:
|
if localizeddomains:
|
||||||
print (localizeddomains)
|
print (localizeddomains)
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|
Loading…
Reference in a new issue