Completed the implementation of handling google groups URLs with 'prev=/' in

them
This commit is contained in:
Daniel DiPaolo 2003-11-25 21:42:25 +00:00
parent d7dfff7f1e
commit 130f30cca8
2 changed files with 8 additions and 0 deletions

View File

@ -322,6 +322,8 @@ class Google(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
fd = urllib2.urlopen(request) fd = urllib2.urlopen(request)
text = fd.read() text = fd.read()
fd.close() fd.close()
mThread = self._ggThread.search(text)
mGroup = self._ggGroup.search(text)
elif '&output=gplain' in match.group(0): elif '&output=gplain' in match.group(0):
mThread = self._ggPlainThread.search(text) mThread = self._ggPlainThread.search(text)
mGroup = self._ggPlainGroup.search(text) mGroup = self._ggPlainGroup.search(text)

View File

@ -55,6 +55,12 @@ class GoogleTestCase(ChannelPluginTestCase, PluginDocumentation):
'selm=1.5.4.32.19970313170853.00674d60%40adan.' 'selm=1.5.4.32.19970313170853.00674d60%40adan.'
'kingston.net&oe=UTF-8&output=gplain', 'kingston.net&oe=UTF-8&output=gplain',
r'Madrid Bluegrass Ramble') 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): def testConfig(self):
self.assertNotError('google config groups-snarfer off') self.assertNotError('google config groups-snarfer off')