Update app.py
Browse files
app.py
CHANGED
|
@@ -88,12 +88,18 @@ st.write(clue_result7)
|
|
| 88 |
|
| 89 |
import requests
|
| 90 |
from bs4 import BeautifulSoup as soup
|
| 91 |
-
import lxml.etree as xml
|
| 92 |
import lxml
|
|
|
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
def define(word):
|
| 95 |
url = f'https://www.dictionary.com/browse/{word}?s=t'
|
| 96 |
-
|
|
|
|
|
|
|
| 97 |
for tag in soup.find_all("meta"):
|
| 98 |
if tag.get("property", None) == "og:description":
|
| 99 |
content = tag.get("content", None)
|
|
|
|
| 88 |
|
| 89 |
import requests
|
| 90 |
from bs4 import BeautifulSoup as soup
|
|
|
|
| 91 |
import lxml
|
| 92 |
+
import lxml.etree as xml
|
| 93 |
|
| 94 |
+
def main():
|
| 95 |
+
r = requests.get('http://www.sourcebits.com/')
|
| 96 |
+
soup = BeautifulSoup(r.content, features="lxml")
|
| 97 |
+
|
| 98 |
def define(word):
|
| 99 |
url = f'https://www.dictionary.com/browse/{word}?s=t'
|
| 100 |
+
r=requests.get(url)
|
| 101 |
+
soup = BeautifulSoup(r.content, features="lxml")
|
| 102 |
+
#soup = BeautifulSoup(url)
|
| 103 |
for tag in soup.find_all("meta"):
|
| 104 |
if tag.get("property", None) == "og:description":
|
| 105 |
content = tag.get("content", None)
|