awacke1 commited on
Commit
8c1bc7e
β€’
1 Parent(s): 4c679bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- definition= soup.find("meta", property="og:description")
98
- st.write(definition)
 
 
 
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)