From 8a544f3651a90efd0934eb8341f4e71f98403b24 Mon Sep 17 00:00:00 2001 From: Yasir Aris M Date: Tue, 10 Sep 2024 09:18:35 +0700 Subject: [PATCH] apanya yg salah yaa --- misskaty/plugins/misc_tools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misskaty/plugins/misc_tools.py b/misskaty/plugins/misc_tools.py index e1bf8728a1..294a20bb4f 100644 --- a/misskaty/plugins/misc_tools.py +++ b/misskaty/plugins/misc_tools.py @@ -319,7 +319,7 @@ async def stackoverflow(_, message): @app.on_message(filters.command(["google"], COMMAND_HANDLER)) @capture_err -async def gsearch(_, message): +async def gsearch(self, message): if len(message.command) == 1: return await message.reply("Give a query to search in Google!") query = message.text.split(maxsplit=1)[1] @@ -336,8 +336,9 @@ async def gsearch(_, message): for result in soup.select(".tF2Cxc"): link = result.select_one(".yuRUbf a")["href"] title = result.select_one(".DKV0Md").text + self.log.info(result) snippet = result.find(class_="VwiC3b yXK7lf lVm3ye r025kc hJNv6b").get_text() if result.find(class_="VwiC3b yXK7lf lVm3ye r025kc hJNv6b") else "-" - + self.log.info(snippet) # appending data to an array data.append( {