From e28e86aa60a22fb06a72815aa547076e4dbe2139 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sat, 25 Nov 2023 16:04:35 +0000 Subject: [PATCH] Request UK version of Google --- google_stocks/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google_stocks/__init__.py b/google_stocks/__init__.py index dbdb0fa..f0c24f2 100644 --- a/google_stocks/__init__.py +++ b/google_stocks/__init__.py @@ -81,7 +81,8 @@ class Index: @property def search_url(self) -> str: """Search URL.""" - return "https://www.google.com/search?q=" + urllib.parse.quote_plus(self.name) + q = urllib.parse.quote_plus(self.name) + return f"https://www.google.com/search?q={q}&gl=uk" def run(self, playwright: Playwright) -> None: """Run playwright."""