mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 10:28:39 +00:00
updated to return the error text
This commit is contained in:
parent
7d27480e25
commit
f4ae6fde40
@ -11,9 +11,7 @@ def stock_price(symbol: str = "AAPL") -> str:
|
|||||||
if specific_fin_streamer_tag:
|
if specific_fin_streamer_tag:
|
||||||
text = specific_fin_streamer_tag.get_text()
|
text = specific_fin_streamer_tag.get_text()
|
||||||
return text
|
return text
|
||||||
else:
|
return "No <fin-streamer> tag with the specified data-test attribute found."
|
||||||
print("No <fin-streamer> tag with the specified data-test attribute found.")
|
|
||||||
return "Not Found"
|
|
||||||
|
|
||||||
# Search for the symbol at https://finance.yahoo.com/lookup
|
# Search for the symbol at https://finance.yahoo.com/lookup
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user