mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +01:00
Escape the .'s in the urls for the snarfer
This commit is contained in:
parent
a2c6084fd9
commit
3dac2d986e
@ -147,7 +147,7 @@ class Gameknot(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
_gkWon = re.compile(r'>(\S+)\s+won')
|
_gkWon = re.compile(r'>(\S+)\s+won')
|
||||||
_gkReason = re.compile(r'won\s+\(\S+\s+(\S+)\)')
|
_gkReason = re.compile(r'won\s+\(\S+\s+(\S+)\)')
|
||||||
def gameknotSnarfer(self, irc, msg, match):
|
def gameknotSnarfer(self, irc, msg, match):
|
||||||
r"http://(?:www\.)?gameknot.com/chess.pl\?bd=\d+(&r=\d+)?"
|
r"http://(?:www\.)?gameknot\.com/chess\.pl\?bd=\d+(&r=\d+)?"
|
||||||
#debug.printf('Got a GK URL from %s' % msg.prefix)
|
#debug.printf('Got a GK URL from %s' % msg.prefix)
|
||||||
url = match.group(0)
|
url = match.group(0)
|
||||||
fd = urllib2.urlopen(url)
|
fd = urllib2.urlopen(url)
|
||||||
|
@ -216,7 +216,7 @@ class Sourceforge(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
_sfTitle = re.compile(r'Detail:(\d+) - ([^<]+)</title>', re.I)
|
_sfTitle = re.compile(r'Detail:(\d+) - ([^<]+)</title>', re.I)
|
||||||
_linkType = re.compile(r'(\w+ \w+|\w+): Tracker Detailed View', re.I)
|
_linkType = re.compile(r'(\w+ \w+|\w+): Tracker Detailed View', re.I)
|
||||||
def sourceforgeSnarfer(self, irc, msg, match):
|
def sourceforgeSnarfer(self, irc, msg, match):
|
||||||
r"https?://(?:www\.)?sourceforge.net/tracker/index.php\?func=detail&aid=\d+&group_id=\d+&atid=\d+"
|
r"https?://(?:www\.)?sourceforge\.net/tracker/index\.php\?func=detail&aid=\d+&group_id=\d+&atid=\d+"
|
||||||
url = match.group(0)
|
url = match.group(0)
|
||||||
fd = urllib2.urlopen(url)
|
fd = urllib2.urlopen(url)
|
||||||
s = fd.read()
|
s = fd.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user