Skip to content

updated the URL and HTML tags for scrapping yahoo finance #8942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updated to return the error text
  • Loading branch information
Suman2023 committed Aug 11, 2023
commit f4ae6fde40a345d1cb0d7f1904d12d20fc8ed9e4
4 changes: 1 addition & 3 deletions web_programming/current_stock_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down