






'''simple docstring'''
import requests
from bsa import BeautifulSoup




def 						__SCREAMING_SNAKE_CASE   (					_UpperCamelCase  ,						_UpperCamelCase							):


   """simple docstring"""




   lowercase_		:      Dict          =       (
       "https://www.horoscope.com/us/horoscopes/general/"
       F"""horoscope-general-daily-{day}.aspx?sign={zodiac_sign}"""
   )
   lowercase_		:      List[Any]          =       BeautifulSoup(requests.get(_UpperCamelCase							).content  ,						"html.parser"							)
   return soup.find("div"  ,						class_="main-horoscope"							).p.text


if __name__ == "__main__":
 print('Daily Horoscope. \n')
 print(
     'enter your Zodiac sign number:\n',
     '1. Aries\n',
     '2. Taurus\n',
     '3. Gemini\n',
     '4. Cancer\n',
     '5. Leo\n',
     '6. Virgo\n',
     '7. Libra\n',
     '8. Scorpio\n',
     '9. Sagittarius\n',
     '10. Capricorn\n',
     '11. Aquarius\n',
     '12. Pisces\n',
 )
 UpperCamelCase__	=     int(input('number> ').strip())
 print('choose some day:\n', 'yesterday\n', 'today\n', 'tomorrow\n')
 UpperCamelCase__	=     input('enter the day> ')
 UpperCamelCase__	=     horoscope(zodiac_sign, day)
 print(horoscope_text)












'''simple docstring'''
from urllib.error import HTTPError

from bsa import BeautifulSoup
from requests import exceptions, get

UpperCamelCase__	=     'https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true'




def 						__SCREAMING_SNAKE_CASE   (					_UpperCamelCase  ,						_UpperCamelCase							):


   """simple docstring"""




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

      lowercase_		:      List[str]          =       BASE_URL.format(_UpperCamelCase  ,						_UpperCamelCase							)
      lowercase_		:      Union[str, Any]          =       get(_UpperCamelCase							)

      # Is the response ok?
      response.raise_for_status()

      # Scrape the data using bs4
      lowercase_		:      Any          =       BeautifulSoup(response.text  ,						"html.parser"							)

      # This list will store the name and price.
      lowercase_		:      List[str]          =       []

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

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

 UpperCamelCase__	=     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__	=     pharmacy_price['pharmacy_name']
   UpperCamelCase__	=     pharmacy_price['price']

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




