Spaces:
Sleeping
Sleeping
Make correction to 'get_tomorrows_prediction' tool.
Browse files
app.py
CHANGED
@@ -37,10 +37,12 @@ def get_tomorrows_prediction(zodiac_sign: str) -> str:
|
|
37 |
s = soup.find('div', class_='parah_aries_horocope')
|
38 |
content = soup.find_all('p')
|
39 |
|
40 |
-
#
|
41 |
-
|
|
|
|
|
42 |
|
43 |
-
return
|
44 |
|
45 |
except Exception as e:
|
46 |
return f"Error fetching the horoscope."
|
|
|
37 |
s = soup.find('div', class_='parah_aries_horocope')
|
38 |
content = soup.find_all('p')
|
39 |
|
40 |
+
# Converting tag object to string
|
41 |
+
l = []
|
42 |
+
for item in content[:6]:
|
43 |
+
l.append(item.get_text())
|
44 |
|
45 |
+
return "".join(l)
|
46 |
|
47 |
except Exception as e:
|
48 |
return f"Error fetching the horoscope."
|