From 3203eae258b4396a0776ba769c8c74e08294c722 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Sun, 12 Feb 2012 01:06:32 -0500 Subject: [PATCH] rule34: fix --- modules/rule34.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/rule34.py b/modules/rule34.py index 2a5d538..619bfdb 100644 --- a/modules/rule34.py +++ b/modules/rule34.py @@ -25,13 +25,13 @@ def rule34(phenny, input): doc = lxml.html.fromstring(req) doc.make_links_absolute('http://rule34.xxx/') - thumb = doc.find_class('thumb') - if len(thumb) <= 0: + thumbs = doc.find_class('thumb') + if len(thumbs) <= 0: phenny.reply("You just broke Rule 34! Better start uploading...") return try: - link = thumb.find('a').attrib['href'] + link = thumbs[0].find('a').attrib['href'] except AttributeError: phenny.say("THE INTERNET IS FUCKING BROKEN. Please try again later.") return