From 130f30cca8c76041690c3e39fd41ece628565752 Mon Sep 17 00:00:00 2001 From: Daniel DiPaolo Date: Tue, 25 Nov 2003 21:42:25 +0000 Subject: [PATCH] Completed the implementation of handling google groups URLs with 'prev=/' in them --- plugins/Google.py | 2 ++ test/test_Google.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/plugins/Google.py b/plugins/Google.py index 936ca25e0..08e73774b 100644 --- a/plugins/Google.py +++ b/plugins/Google.py @@ -322,6 +322,8 @@ class Google(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable): fd = urllib2.urlopen(request) text = fd.read() fd.close() + mThread = self._ggThread.search(text) + mGroup = self._ggGroup.search(text) elif '&output=gplain' in match.group(0): mThread = self._ggPlainThread.search(text) mGroup = self._ggPlainGroup.search(text) diff --git a/test/test_Google.py b/test/test_Google.py index 46710eb3f..3a83f4f52 100644 --- a/test/test_Google.py +++ b/test/test_Google.py @@ -55,6 +55,12 @@ class GoogleTestCase(ChannelPluginTestCase, PluginDocumentation): 'selm=1.5.4.32.19970313170853.00674d60%40adan.' 'kingston.net&oe=UTF-8&output=gplain', r'Madrid Bluegrass Ramble') + self.assertRegexp('http://groups.google.com/groups?' + 'dq=&hl=en&lr=&ie=UTF-8&threadm=mailman.1010.' + '1069645289.702.python-list%40python.org' + '&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8' + '%26group%3Dcomp.lang.python', + r'comp\.lang\.python.*What exactly are bound') def testConfig(self): self.assertNotError('google config groups-snarfer off')