






from urllib.error import HTTPError

from bsa import BeautifulSoup
from requests import exceptions, get

UpperCamelCase__  :					Union[str, Any]  						=    """https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true"""





def      SCREAMING_SNAKE_CASE__  (      snake_case_,     snake_case_     )      ->     int:


	"""simple docstring"""



	try:
		# Has user provided both inputs?
		if not drug_name or not zip_code:
			return None

		a				=	BASE_URL.format(__lowerCamelCase,     __lowerCamelCase     )
		a				=	get(__lowerCamelCase     )

		# Is the response ok?
		response.raise_for_status()

		# Scrape the data using bs4
		a				=	BeautifulSoup(response.text,     '''html.parser'''     )

		# This list will store the name and price.
		a				=	[]

		# Fetch all the grids that contains the items.
		a				=	soup.find_all('''div''',     {'''class''': '''grid-x pharmCard'''}     )
		if grid_list and len(__lowerCamelCase     ) > 0:
			for grid in grid_list:
				# Get the pharmacy price.
				a				=	grid.find('''p''',     {'''class''': '''list-title'''}     ).text

				# Get price of the drug.
				a				=	grid.find('''span''',     {'''p''', '''price price-large'''}     ).text

				pharmacy_price_list.append(
				    {
				        '''pharmacy_name''': pharmacy_name,
				        '''price''': price,
				    }     )

		return pharmacy_price_list

	except (HTTPError, exceptions.RequestException, ValueError):
		return None


if __name__ == "__main__":
				# Enter a drug name and a zip code
				UpperCamelCase__  :					List[Any]  						=    input("""Enter drug name: """).strip()
				UpperCamelCase__  :					int  						=    input("""Enter zip code: """).strip()

				UpperCamelCase__  :					Optional[int]  						=    fetch_pharmacy_and_price_list(
				    drug_name, zip_code
				)

				if pharmacy_price_list:
								print(F"\nSearch results for {drug_name} at location {zip_code}:")
								for pharmacy_price in pharmacy_price_list:
												UpperCamelCase__  :					Union[str, Any]  						=    pharmacy_price["""pharmacy_name"""]
												UpperCamelCase__  :					List[Any]  						=    pharmacy_price["""price"""]

												print(F"Pharmacy: {name} Price: {price}")
				else:
								print(F"No results found for {drug_name}")












from typing import Literal

UpperCamelCase__          ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'






def 			lowerCamelCase__	(__lowerCamelCase,				__lowerCamelCase,				__lowerCamelCase		):
     _SCREAMING_SNAKE_CASE				:		Tuple  			=							LETTERS if mode == "decrypt" else key
     _SCREAMING_SNAKE_CASE				:		Tuple  			=							key if mode == "decrypt" else LETTERS
     _SCREAMING_SNAKE_CASE				:		Dict  			=							""
     # loop through each symbol in the message
     for symbol in message:
          if symbol.upper() in chars_a:
               # encrypt/decrypt the symbol
               _SCREAMING_SNAKE_CASE				:		List[str]  			=							chars_a.find(symbol.upper()		)
               if symbol.isupper():
                    translated += chars_b[sym_index].upper()
               else:
                    translated += chars_b[sym_index].lower()
          else:
               # symbol is not in LETTERS, just add it
               translated += symbol
     return translated






def 			lowerCamelCase__	(__lowerCamelCase,				__lowerCamelCase		):
     return translate_message(__lowerCamelCase,				__lowerCamelCase,				"encrypt"		)






def 			lowerCamelCase__	(__lowerCamelCase,				__lowerCamelCase		):
     return translate_message(__lowerCamelCase,				__lowerCamelCase,				"decrypt"		)






def 			lowerCamelCase__	():
     _SCREAMING_SNAKE_CASE				:		str  			=							"Hello World"
     _SCREAMING_SNAKE_CASE				:		List[str]  			=							"QWERTYUIOPASDFGHJKLZXCVBNM"
     _SCREAMING_SNAKE_CASE				:		Any  			=							"decrypt"  # set to 'encrypt' or 'decrypt'

     if mode == "encrypt":
          _SCREAMING_SNAKE_CASE				:		int  			=							encrypt_message(__lowerCamelCase,				__lowerCamelCase		)
     elif mode == "decrypt":
          _SCREAMING_SNAKE_CASE				:		Optional[int]  			=							decrypt_message(__lowerCamelCase,				__lowerCamelCase		)
     print(f"""Using the key {key}, the {mode}ed message is: {translated}"""		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()