Updated for new site format

This commit is contained in:
Kevin Murphy 2005-01-04 00:45:40 +00:00
parent 8fc0c228d2
commit e0887194f8

View File

@ -67,9 +67,10 @@ class UrbanDict(callbacks.Privmsg):
irc.error(str(e)) irc.error(str(e))
_wordRE = re.compile(r'<title>UrbanDictionary.com/(?P<word>.*?)</title>') _wordRE = re.compile(r'<title>UrbanDictionary.com/(?P<word>.*?)</title>')
_defUsageRE = re.compile(r'<div style="padding-left: 30px; padding-right: ' _defUsageRE = re.compile(r'<div class="text">\s*<div class="def">'
r'30px"><p>(?P<definition>.*?)</p><p><i>' r'(?P<definition>.*?)</div>\s*<div '
r'(?P<usage>.*?)</i></p>.*?</div>', r'class="example">(?P<usage>.*?)</div>\s*<div '
r'class="source">.*?</div>\s*</div>\s*</td>',
re.MULTILINE | re.DOTALL) re.MULTILINE | re.DOTALL)
def urbandict(self, irc, msg, args): def urbandict(self, irc, msg, args):
"""[<phrase>] """[<phrase>]