better right click

This commit is contained in:
N0\A
2025-10-23 13:33:44 +02:00
parent be288bb984
commit 3cc290a266

14
core/web_search.py Normal file
View File

@@ -0,0 +1,14 @@
import webbrowser
import ddg
def search(query: str) -> None:
"""Performs a web search using the default browser.
Args:
query (str): The search query.
"""
if not query:
raise ValueError("Search query cannot be empty.")
url = f"https://www.google.com/search?q={query.replace(' ', '+')}"
webbrowser.open(url)