Update app.py
Browse files
app.py
CHANGED
@@ -94,8 +94,11 @@ import lxml
|
|
94 |
def define(word):
|
95 |
url = f'https://www.dictionary.com/browse/{word}?s=t'
|
96 |
web_page = soup(requests.get(url, {}).text, "lxml")
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
99 |
|
100 |
for word in clue_result7:
|
101 |
define(word)
|
|
|
94 |
def define(word):
|
95 |
url = f'https://www.dictionary.com/browse/{word}?s=t'
|
96 |
web_page = soup(requests.get(url, {}).text, "lxml")
|
97 |
+
for tag in soup.find_all("meta"):
|
98 |
+
if tag.get("property", None) == "og:description":
|
99 |
+
st.write(tag.get("content", None))
|
100 |
+
#definition= soup.find("meta", property="og:description")
|
101 |
+
#st.write(definition)
|
102 |
|
103 |
for word in clue_result7:
|
104 |
define(word)
|