diff --git a/google_stocks/__init__.py b/google_stocks/__init__.py index dbdb0fa..24a6cbb 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.""" @@ -145,7 +146,4 @@ class Index: @property def one_line(self) -> str: """Index name, price and price change.""" - return ( - f"{self.title}: {self.price} ({self.percent_change}%) " - + f"{self.state} {self.timestamp}" - ) + return f"{self.title}: {self.price} ({self.percent_change}%) {self.timestamp}" diff --git a/s_and_p_total_market b/s_and_p_total_market index bfcfdc0..e1e22d6 100755 --- a/s_and_p_total_market +++ b/s_and_p_total_market @@ -3,6 +3,6 @@ from google_stocks import Index -index = Index("S&P Total Market") +index = Index("SPTMI") print(index.one_line)