mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-27 13:31:08 -05:00
Began fixing google groups parser.
This commit is contained in:
parent
b43acf0d5a
commit
c41b2c2109
@ -48,11 +48,11 @@ import callbacks
|
|||||||
|
|
||||||
class Forums(callbacks.PrivmsgRegexp):
|
class Forums(callbacks.PrivmsgRegexp):
|
||||||
threaded = True
|
threaded = True
|
||||||
_ggThread = re.compile(r'from thread "<b>(.*?)</b>"')
|
_ggThread = re.compile(r'<br>Subject: ([^<]+)<br>')
|
||||||
_ggGroup = re.compile(r'Newsgroups: <a.*?>(.*?)</a>')
|
_ggGroup = re.compile(r'Newsgroups: <a[^>]+>([^<]+)</a>')
|
||||||
def googlegroups(self, irc, msg, match):
|
def googlegroups(self, irc, msg, match):
|
||||||
r"http://groups.google.com/[^\s]+"
|
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)'})
|
{'User-agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)'})
|
||||||
fd = urllib2.urlopen(request)
|
fd = urllib2.urlopen(request)
|
||||||
text = fd.read()
|
text = fd.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user