From 246621f6638f88b73d61e8a803e649d88a315a2f Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Mon, 8 Sep 2014 16:43:21 +0200 Subject: [PATCH] First version of the DomainClassifier --- bin/ZMQ_Sub_DomainClassifier.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/ZMQ_Sub_DomainClassifier.py b/bin/ZMQ_Sub_DomainClassifier.py index a0b65ec1..e246d011 100755 --- a/bin/ZMQ_Sub_DomainClassifier.py +++ b/bin/ZMQ_Sub_DomainClassifier.py @@ -44,6 +44,9 @@ def main(): subscriber_name = "DomainClassifier" 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) # FUNCTIONS # @@ -71,10 +74,10 @@ def main(): c.text(rawtext=paste) c.potentialdomain() c.validdomain(rtype=['A'],extended=True) - localizeddomains = c.include(expression=r'\.lu$') + localizeddomains = c.include(expression=cc_tld) if localizeddomains: print (localizeddomains) - localizeddomains = c.localizedomain(cc='LU') + localizeddomains = c.localizedomain(cc=cc) if localizeddomains: print (localizeddomains) except IOError: