From c1ceb7712382f7691fc84eca63bbaca32eb99a62 Mon Sep 17 00:00:00 2001 From: lodriguez Date: Sat, 1 Feb 2025 16:26:17 +0100 Subject: [PATCH] add oEmbed too title function --- plugins/Web/plugin.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index a4b6bc9b0..6f4e296b3 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -489,10 +489,13 @@ class Web(callbacks.PluginRegexp): if not self._checkURLWhitelist(url): irc.error("This url is not on the whitelist.") return - r = self.getTitle(irc, url, True, msg) - if not r: - return - (target, title) = r + title = self.getOEmbedTitle(url) + target = url + if not title: + r = self.getTitle(irc, url, True, msg) + if not r: + return + (target, title) = r if title: if not [y for x,y in optlist if x == 'no-filter']: for i in range(1, 4):