def notify(self, title, text, url=False):
        body = text + ' - ' + url
        jid = xmpp.protocol.JID(self.xmpp_jid)
        cl = xmpp.Client(jid.getDomain(),debug=[])
        if not cl.connect():
            raise Exception("Connect failed.")

        if not cl.auth(jid.getNode(), self.xmpp_password, resource=jid.getResource()):
            raise Exception("Authentication failed.")

        for recipient in self.xmpp_recipient:
            if not cl.send(xmpp.protocol.Message(recipient, body)):
                _logger.error("Failed to send message to %s" % (recipient, ))
            else:
                _logger.info("XMPP sent: [%s] %s" % (recipient, body))
Send XMPP notification
dataset/ETHPy150Open MA3STR0/kimsufi-crawler/notifiers/xmpp_notifier.py/XMPPNotifier.notify