diff --git a/plugins/Http.py b/plugins/Http.py
index 5791af31d..081ec05c0 100644
--- a/plugins/Http.py
+++ b/plugins/Http.py
@@ -50,11 +50,11 @@ class FreshmeatException(Exception):
class Http(callbacks.Privmsg):
threaded = True
- _fmProject = re.compile('(.*?)')
- _fmVersion = re.compile('(.*?)')
- _fmVitality = re.compile('(.*?)')
- _fmPopularity =re.compile('(.*?)')
- _fmLastUpdated = re.compile('(.*?)')
+ _fmProject = re.compile('([^<]+)')
+ _fmVersion = re.compile('([^<]+)')
+ _fmVitality = re.compile('([^<]+)')
+ _fmPopular=re.compile('([^<]+)')
+ _fmLastUpdated = re.compile('([^<]+)')
def freshmeat(self, irc, msg, args):
""
project = privmsgs.getArgs(args)
@@ -68,7 +68,7 @@ class Http(callbacks.Privmsg):
project = self._fmProject.search(text).group(1)
version = self._fmVersion.search(text).group(1)
vitality = self._fmVitality.search(text).group(1)
- popularity = self._fmPopularity.search(text).group(1)
+ popularity = self._fmPopular.search(text).group(1)
lastupdated = self._fmLastUpdated.search(text).group(1)
irc.reply(msg,
'%s, last updated %s, with a vitality percent of %s '\
@@ -80,28 +80,6 @@ class Http(callbacks.Privmsg):
debug.recoverableException()
irc.reply(msg, debug.exnToString(e))
- _htmlTag = re.compile('<.*?>')
- _htmlEntity = re.compile('&.*?;')
- _html = re.compile('<.*?>|&.*?;')
- def cfactive(self, irc, msg, args):
- "takes no arguments."
- try:
- fd = urllib2.urlopen('http://www.coderforums.net/')
- except Exception, e:
- irc.error(msg, debug.exnToString(e))
- text = fd.read()
- fd.close()
- text = self._htmlTag.sub('', text)
- lines = text.splitlines()
- sent = False
- for i in range(len(lines) - 1):
- if lines[i].strip().startswith('Most'):
- sent = True
- irc.reply(msg, lines[i+1].strip())
- break
- if not sent:
- irc.reply(msg, 'The format of the page seems odd.')
-
def stockquote(self, irc, msg, args):
""
symbol = privmsgs.getArgs(args)