
Untitled
By: a guest on
Jul 6th, 2012 | syntax:
None | size: 0.90 KB | hits: 14 | expires: Never
def tvn(self, irc, msg, args, text):
""" - do a search for next episode to be aired """
re_next = re.compile(r'Next\sEpisode@(.*?\d{4})')
re_show = re.compile(r'Show\sName@(.*?)\sShow')
re_time = re.compile(r'Airtime@(.*?)')
showsrc = self.search(text)
showname = re_show.findall(showsrc)
nextep = re_next.findall(showsrc)
airtime = re_time.findall(showsrc)
if not showname:
irc.reply("Could not find the series.")
elif not nextep:
irc.reply(format("%s: The air date for next episode has not been determined.", ircutils.bold(showname[0])), prefixNick=False)
else:
nextep = nextep[0].split("^")
irc.reply(format('%s: Next episode (%s), "%s", airs %s', ircutils.bold(showname[0]), nextep[0], nextep[1], nextep[2]), airtime[0], prefixNick=False)
tvn = wrap(tvn,['text'])