Add magic 8-ball, tweak mylife

This commit is contained in:
mutantmonkey
2011-09-02 17:11:12 -04:00
parent 77df66a31b
commit 4b6ebf0f21
2 changed files with 56 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
"""
mylife.py - various commentary on life
author: Ramblurr <unnamedrambler@gmail.com>
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
"""
import random
@@ -47,10 +48,11 @@ def mliarab(phenny, input):
return
doc = lxml.html.parse(req)
quote = doc.getroot().find_class('entry')[0][0].text_content()
quotes = doc.getroot().find_class('entry')
quote = random.choice(quotes)[0].text_content()
quote = quote.strip()
phenny.say(quote)
mliarab.commands = ['mliarab']
mliarab.commands = ['mliar', 'mliarab']
def mlib(phenny, input):
""".mlib - My life is bro."""