google Force Simplified Chinese Results for MagicGoogle Searches (#187)
All checks were successful
Github commit to telegram / build (push) Successful in 15s

This commit is contained in:
Godlike 2024-11-02 21:51:18 +08:00 committed by GitHub
parent 79532983c0
commit 003dbd8bca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,7 +22,7 @@ async def google(message: Message):
if not Config.SILENT: if not Config.SILENT:
message = await message.edit(lang("google_processing")) message = await message.edit(lang("google_processing"))
results = "" results = ""
for i in mg.search(query=query, num=5): for i in mg.search(query=query, num=5, language="zh-CN"):
try: try:
title = i["text"][:30] + "..." title = i["text"][:30] + "..."
link = i["url"] link = i["url"]