Compare commits
2 commits
e5225ba239
...
be1a333d75
Author | SHA1 | Date | |
---|---|---|---|
Edward Betts | be1a333d75 | ||
Edward Betts | e28e86aa60 |
|
@ -81,7 +81,8 @@ class Index:
|
||||||
@property
|
@property
|
||||||
def search_url(self) -> str:
|
def search_url(self) -> str:
|
||||||
"""Search URL."""
|
"""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:
|
def run(self, playwright: Playwright) -> None:
|
||||||
"""Run playwright."""
|
"""Run playwright."""
|
||||||
|
@ -145,7 +146,4 @@ class Index:
|
||||||
@property
|
@property
|
||||||
def one_line(self) -> str:
|
def one_line(self) -> str:
|
||||||
"""Index name, price and price change."""
|
"""Index name, price and price change."""
|
||||||
return (
|
return f"{self.title}: {self.price} ({self.percent_change}%) {self.timestamp}"
|
||||||
f"{self.title}: {self.price} ({self.percent_change}%) "
|
|
||||||
+ f"{self.state} {self.timestamp}"
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in a new issue