Update app.py
Browse files
app.py
CHANGED
@@ -95,10 +95,10 @@ def define(word):
|
|
95 |
url = f'https://www.dictionary.com/browse/{word}?s=t'
|
96 |
web_page = bs(requests.get(url, {}).text, "lxml")
|
97 |
st.write('Definition: ' + web_page)
|
98 |
-
meanings = web_page.find_all('
|
99 |
for meaning in meanings:
|
100 |
st.write('* '+ meaning.text)
|
101 |
-
st.write(meanings[0].text)
|
102 |
|
103 |
for word in clue_result7:
|
104 |
define(word)
|
|
|
95 |
url = f'https://www.dictionary.com/browse/{word}?s=t'
|
96 |
web_page = bs(requests.get(url, {}).text, "lxml")
|
97 |
st.write('Definition: ' + web_page)
|
98 |
+
meanings = web_page.find_all('meta', attrs={'og:description': 'css-1ghs5zt e1q3nk1v2'})
|
99 |
for meaning in meanings:
|
100 |
st.write('* '+ meaning.text)
|
101 |
+
#st.write(meanings[0].text)
|
102 |
|
103 |
for word in clue_result7:
|
104 |
define(word)
|