




'''simple docstring'''





import requests
from bsa import BeautifulSoup

def 			a   (_lowerCAmelCase = "AAPL"     ):
							SCREAMING_SNAKE_CASE_   	=    F"https://in.finance.yahoo.com/quote/{symbol}?s={symbol}"
							SCREAMING_SNAKE_CASE_   	=    BeautifulSoup(requests.get(_SCREAMING_SNAKE_CASE     ).text  ,    '''html.parser'''     )
							SCREAMING_SNAKE_CASE_   	=    '''My(6px) Pos(r) smartphone_Mt(6px)'''
							return soup.find('''div'''  ,    class_=class_     ).find('''span'''     ).text


if __name__ == "__main__":
			for symbol in "AAPL AMZN IBM GOOG MSFT ORCL".split():
						print(f"""Current {symbol:<4} stock price is {stock_price(symbol):>8}""")








import requests

def 			a   (_lowerCAmelCase  ,    _lowerCAmelCase     ):
							SCREAMING_SNAKE_CASE_   	=    {'''Content-Type''': '''application/json'''}
							SCREAMING_SNAKE_CASE_   	=    requests.post(_lowerCAmelCase  ,    json={'''text''': message_body}  ,    headers=_lowerCAmelCase     )
							if response.status_code != 2_0_0:
														SCREAMING_SNAKE_CASE_   	=    (
														    '''Request to slack returned an error '''
														    F"{response.status_code}, the response is:\n{response.text}"
														)
														raise ValueError(_lowerCAmelCase     )


if __name__ == "__main__":
			# Set the slack url to the one provided by Slack when you create the webhook at
			# https://my.slack.com/services/new/incoming-webhook/
			send_slack_message("""<YOUR MESSAGE BODY>""", """<SLACK CHANNEL URL>""")


