Google: Apply gholms's patch to fix @calc match.

This commit is contained in:
Valentin Lorentz 2011-11-09 10:04:53 +01:00
parent a93750bad7
commit cf8126223b

View File

@ -327,7 +327,7 @@ class Google(callbacks.PluginRegexp):
url = r'http://google.com/search?q=' + s
return url
_calcRe = re.compile(r'<h\d class="?r"?.*?<b>(.*?)</b>', re.I)
_calcRe = re.compile(r'<h\d class="?r"?[^>]*>(?:<b>)?(.*?)(?:</b>)?</h\d>', re.I | re.S)
_calcSupRe = re.compile(r'<sup>(.*?)</sup>', re.I)
_calcFontRe = re.compile(r'<font size=-2>(.*?)</font>')
_calcTimesRe = re.compile(r'&(?:times|#215);')