We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa63803 commit 3eed96cCopy full SHA for 3eed96c
web_programming/current_stock_price.py
@@ -27,13 +27,13 @@ def stock_price(symbol: str = "AAPL") -> str:
27
url, headers={"USER-AGENT": "Mozilla/5.0"}, timeout=10
28
).text
29
except requests.exceptions.RequestException:
30
- return '- '
+ return "- "
31
32
soup = BeautifulSoup(yahoo_finance_source, "html.parser")
33
34
if specific_fin_streamer_tag := soup.find("span", {"data-testid": "qsp-price"}):
35
return specific_fin_streamer_tag.get_text()
36
37
38
39
# Search for the symbol at https://finance.yahoo.com/lookup
0 commit comments