def answer(self, cmd, sender, message): url = self.dico[cmd]['url'] if message: if 'KEYWORDS' in url: url = url.replace('KEYWORDS', message).replace(' ', '+') else: return _("This command does not take arguments") return check_url(url.encode('utf-8'), geturl=True)
def answer(self, cmd, sender, message): if message: return check_url(self.dico[cmd]['url'].replace('KEYWORDS', message).replace(' ', '+'), geturl=True) return "rtfm ;)"
def get_title(self, urls): send = [] for url in urls: send += check_url(url) return send
def answer(self, sender, message): return check_url('http://9gag.com/random', geturl=True)