From 6976d587d52aea7c66a2f93e0a231013609bc329 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 6 Apr 2003 11:48:29 +0000 Subject: [PATCH] Removed slashdot and moved it to RSS.py --- plugins/Http.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/plugins/Http.py b/plugins/Http.py index 4030fda67..831a4fa9b 100644 --- a/plugins/Http.py +++ b/plugins/Http.py @@ -45,12 +45,8 @@ Commands include: from baseplugin import * import re -import time import urllib import urllib2 -import xml.dom.minidom - -import rssparser import utils import debug @@ -234,23 +230,6 @@ class Http(callbacks.Privmsg): except urllib2.URLError: irc.error(msg, 'Couldn\'t open the search page.') - _slashdotTime = 0.0 - def slashdot(self, irc, msg, args): - """takes no arguments - - Returns the current headlines on slashdot.org, News for Nerds, Stuff - that Matters. - """ - if time.time() - self._slashdotTime > 1800: - results = rssparser.parse('http://slashdot.org/slashdot.rss') - headlines = [x['title'] for x in results['items']] - self._slashdotResponse = ' :: '.join(headlines) - while len(self._slashdotResponse) > 400: - headlines.pop() - self._slashdotResponse = ' :: '.join(headlines) - self._slashdotTime = time.time() - irc.reply(msg, self._slashdotResponse) - _geekquotere = re.compile('

(.*?)

') def geekquote(self, irc, msg, args): """[]