Skip to content

Commit

Permalink
Add glados quote plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Apr 28, 2015
1 parent 3ebb69c commit 4e3e578
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions edsu-plugins/Assorted/plugin.py
Expand Up @@ -195,6 +195,14 @@ def twss(self, irc, msg, args):
twss = soup.find("h1")
irc.reply(twss.string.encode('utf8'))

def glados(self, irc, msg, args):
"""Pulls a random GLaDOS quote from http://theportalwiki.com/wiki/GLaDOS_voice_lines"""
html = urlopen("http://theportalwiki.com/wiki/GLaDOS_voice_lines").read()
soup = BeautifulSoup(html)
tags = soup.findAll('a', text='Download')
response = random.choice(tags).parent.parent.parent.find('i').text
irc.reply(response.encode('utf8'), prefixNick=False)

def hench(self, irc, msg, args):
"""Generates an evil henchperson name from http://www.seventhsanctum.com/"""
html = urlopen("http://www.seventhsanctum.com/generate.php?Genname=evilnamer").read()
Expand Down

0 comments on commit 4e3e578

Please sign in to comment.