Google: Fix calc by basing the regex off the calc img

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2009-03-19 21:10:46 -04:00
parent 7b906fbf54
commit 13715a0ca3

View File

@ -329,7 +329,7 @@ class Google(callbacks.PluginRegexp):
url = r'http://google.com/search?q=' + s url = r'http://google.com/search?q=' + s
return url return url
_calcRe = re.compile(r'<font size=\+1><b>(.*?)</b>', re.I) _calcRe = re.compile(r'<img src=/images/calc_img\.gif.*?<b>(.*?)</b>', re.I)
_calcSupRe = re.compile(r'<sup>(.*?)</sup>', re.I) _calcSupRe = re.compile(r'<sup>(.*?)</sup>', re.I)
_calcFontRe = re.compile(r'<font size=-2>(.*?)</font>') _calcFontRe = re.compile(r'<font size=-2>(.*?)</font>')
_calcTimesRe = re.compile(r'&(?:times|#215);') _calcTimesRe = re.compile(r'&(?:times|#215);')