diff options
author | lassulus <lassulus@googlemail.com> | 2014-01-06 01:54:56 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2014-01-06 01:54:56 +0100 |
commit | 3744f04e36147cd5ebc77ea00f70c0af2b211556 (patch) | |
tree | 3d8776fc543a43811bbdad3eecedd35dab108d8d /ircbot/rssbot.py | |
parent | c7ab5042fef55b71baf6bb637cb6033b25007845 (diff) |
ircbot: environ arguments support
Diffstat (limited to 'ircbot/rssbot.py')
-rwxr-xr-x | ircbot/rssbot.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ircbot/rssbot.py b/ircbot/rssbot.py index f0e19c5a..cb7a1543 100755 --- a/ircbot/rssbot.py +++ b/ircbot/rssbot.py @@ -9,7 +9,7 @@ from datetime import datetime from time import sleep class RssBot(irc.bot.SingleServerIRCBot): - def __init__(self, rss, name, server='ire', port=6667, chan='#news', timeout=60): + def __init__(self, rss, name, url_shortener="http://localhost", server='ire', port=6667, chan='#news', timeout=60): irc.bot.SingleServerIRCBot.__init__(self, [(server, port)], name, name) self.url = rss self.name = name @@ -47,7 +47,7 @@ class RssBot(irc.bot.SingleServerIRCBot): #try: # self.send(entry.title + " " + entry.link + " com: " + entry.comments) #except AttributeError: - shorturl = subprocess.check_output(["curl", "-sS", "-F", "uri=" + entry.link, "http://wall:1337"]).decode() + shorturl = subprocess.check_output(["curl", "-sS", "-F", "uri=" + entry.link, url_shortener]).decode() self.send(entry.title + " " + shorturl) self.oldnews.append(entry.link) self.lastnew = datetime.now() |