MCPcopy Create free account
hub / github.com/geekcomputers/Python / horoscope

Function horoscope

daily_horoscope.py:66–72  ·  view source on GitHub ↗
(zodiac_sign: int, day: str)

Source from the content-addressed store, hash-verified

64
65
66def 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
75if __name__ == "__main__":

Callers 1

daily_horoscope.pyFile · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected