Began fixing google groups parser.

This commit is contained in:
James Vega 2003-03-28 01:43:08 +00:00
parent b43acf0d5a
commit c41b2c2109
1 changed files with 3 additions and 3 deletions

View File

@ -48,11 +48,11 @@ import callbacks
class Forums(callbacks.PrivmsgRegexp):
threaded = True
_ggThread = re.compile(r'from thread &quot;<b>(.*?)</b>&quot;')
_ggGroup = re.compile(r'Newsgroups: <a.*?>(.*?)</a>')
_ggThread = re.compile(r'<br>Subject: ([^<]+)<br>')
_ggGroup = re.compile(r'Newsgroups: <a[^>]+>([^<]+)</a>')
def googlegroups(self, irc, msg, match):
r"http://groups.google.com/[^\s]+"
request = urllib2.Request(match.group(0), headers=\
request = urllib2.Request(match.group(0)+'&frame=off', headers=\
{'User-agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)'})
fd = urllib2.urlopen(request)
text = fd.read()