
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       _lowercase					(      __SCREAMING_SNAKE_CASE				,    __SCREAMING_SNAKE_CASE )	->     Dict:

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

						UpperCamelCase__    :		Optional[Any]     =				BASE_URL.format(__SCREAMING_SNAKE_CASE				,    __SCREAMING_SNAKE_CASE )
						UpperCamelCase__    :		str     =				get(__SCREAMING_SNAKE_CASE )

						# Is the response ok?
						response.raise_for_status()

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

						# This list will store the name and price.
						UpperCamelCase__    :		Optional[Any]     =				[]

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

												# Get price of the drug.
												UpperCamelCase__    :		Dict     =				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__				:  Optional[int]       					=				input('''Enter drug name: ''').strip()
							UpperCAmelCase__				:  List[Any]       					=				input('''Enter zip code: ''').strip()

							UpperCAmelCase__				:  list | None       					=				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__				:  Tuple       					=				pharmacy_price["""pharmacy_name"""]
																					UpperCAmelCase__				:  str       					=				pharmacy_price["""price"""]

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





import numpy as np

UpperCAmelCase__				:  str       					=				[
    ['''a''', '''b''', '''c''', '''d''', '''e'''],
    ['''f''', '''g''', '''h''', '''i''', '''k'''],
    ['''l''', '''m''', '''n''', '''o''', '''p'''],
    ['''q''', '''r''', '''s''', '''t''', '''u'''],
    ['''v''', '''w''', '''x''', '''y''', '''z'''],
]



class 			UpperCamelCase_			:




							'''simple docstring'''

							def __init__(				self) ->	None:
										UpperCamelCase__    :		Any     =				np.array(UpperCamelCase)
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	np.ndarray:
										UpperCamelCase__   ,			UpperCamelCase__    :		Optional[int]     =				np.where(letter == self.SQUARE)
										UpperCamelCase__    :		int     =				np.concatenate([indexa + 1, indexa + 1])
										return indexes
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase     ,						UpperCamelCase) ->	str:
										return self.SQUARE[indexa - 1, indexa - 1]
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	str:
										UpperCamelCase__    :		str     =				message.lower()
										UpperCamelCase__    :		int     =				message.replace('j'     ,						'i')

										UpperCamelCase__    :		List[Any]     =				''
										for letter_index in range(len(UpperCamelCase)):
													if message[letter_index] != " ":
																UpperCamelCase__    :		Union[str, Any]     =				self.letter_to_numbers(message[letter_index])
																UpperCamelCase__    :		int     =				encoded_message + str(numbers[0]) + str(numbers[1])
													elif message[letter_index] == " ":
																UpperCamelCase__    :		str     =				encoded_message + ' '

										return encoded_message






							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	str:
										UpperCamelCase__    :		Union[str, Any]     =				message.replace(' '     ,						'  ')
										UpperCamelCase__    :		int     =				''
										for numbers_index in range(int(len(UpperCamelCase) / 2)):
													if message[numbers_index * 2] != " ":
																UpperCamelCase__    :		List[str]     =				message[numbers_index * 2]
																UpperCamelCase__    :		Tuple     =				message[numbers_index * 2 + 1]

																UpperCamelCase__    :		Tuple     =				self.numbers_to_letter(int(UpperCamelCase)     ,						int(UpperCamelCase))
																UpperCamelCase__    :		List[str]     =				decoded_message + letter
													elif message[numbers_index * 2] == " ":
																UpperCamelCase__    :		str     =				decoded_message + ' '

										return decoded_message



