updated to return the error text

This commit is contained in:
Suman 2023-08-11 16:10:51 +05:30
parent 7d27480e25
commit f4ae6fde40

View File

@ -11,9 +11,7 @@ def stock_price(symbol: str = "AAPL") -> str:
if specific_fin_streamer_tag:
text = specific_fin_streamer_tag.get_text()
return text
else:
print("No <fin-streamer> tag with the specified data-test attribute found.")
return "Not Found"
return "No <fin-streamer> tag with the specified data-test attribute found."
# Search for the symbol at https://finance.yahoo.com/lookup
if __name__ == "__main__":