mylife: add my life is Harry Potter
parent
bd69dcfed4
commit
6897760ab7
|
@ -106,6 +106,19 @@ def mlih(phenny, input):
|
||||||
phenny.say(quote)
|
phenny.say(quote)
|
||||||
mlih.commands = ['mlih']
|
mlih.commands = ['mlih']
|
||||||
|
|
||||||
|
def mlihp(phenny, input):
|
||||||
|
""".mlihp - My life is Harry Potter."""
|
||||||
|
try:
|
||||||
|
req = urlopen("http://www.mylifeishp.com/random")
|
||||||
|
except HTTPError:
|
||||||
|
phenny.say("This service is not available to Muggles.")
|
||||||
|
return
|
||||||
|
|
||||||
|
doc = lxml.html.parse(req)
|
||||||
|
quote = doc.getroot().find_class('oldlink')[0][0].text_content()
|
||||||
|
phenny.say(quote)
|
||||||
|
mlihp.commands = ['mlihp']
|
||||||
|
|
||||||
def mlit(phenny, input):
|
def mlit(phenny, input):
|
||||||
""".mlit - My life is Twilight."""
|
""".mlit - My life is Twilight."""
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue