From f8a14547f944a2680ec0b9e77cf2c069807cabbc Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 15 May 2020 19:56:36 +0200 Subject: [PATCH] Google: Update regexp. --- plugins/Google/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index 800863d33..d82a3cdbb 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -75,7 +75,7 @@ class Google(callbacks.PluginRegexp): msg = ircmsgs.privmsg(msg.args[0], s, msg=msg) return msg - _decode_re = re.compile(r'
(?P.*?)</div><div class="(\w| )+">(?P<breadcrumbs>.*?)</div></a></div>(?P<content><div class="(\w| )+">.*?</div></div>)', re.DOTALL | re.MULTILINE) + _decode_re = re.compile(r'<div class="\w+"><a href="/url\?q=(?P<url>[^"]+)&[^"]+"[^>]*><div class="(\w| )+">(?P<title>.*?)</div><div class="(\w| )+">(?P<breadcrumbs>.*?)</div></a></div>(?P<content><div class="(\w| )+">.*?</div></div>)', re.DOTALL | re.MULTILINE) @classmethod def decode(cls, text): matches = cls._decode_re.finditer(text)