(zodiac_sign: int, day: str)
| 64 | |
| 65 | |
| 66 | def horoscope(zodiac_sign: int, day: str) -> str: |
| 67 | url = ( |
| 68 | "https://www.horoscope.com/us/horoscopes/general/" |
| 69 | f"horoscope-general-daily-{day}.aspx?sign={zodiac_sign}" |
| 70 | ) |
| 71 | soup = BeautifulSoup(requests.get(url).content, "html.parser") |
| 72 | return soup.find("div", class_="main-horoscope").p.text |
| 73 | |
| 74 | |
| 75 | if __name__ == "__main__": |