Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,11 +63,11 @@ def find_all(url):
|
|
63 |
#source = urllib.request.urlopen(url).read()
|
64 |
soup = bs4.BeautifulSoup(source.content,'lxml')
|
65 |
|
66 |
-
rawp=(f'
|
67 |
cnt=0
|
68 |
cnt+=len(rawp)
|
69 |
out.append(rawp)
|
70 |
-
out.append("HTML fragments: ")
|
71 |
q=("a","p","span","content","article")
|
72 |
for p in soup.find_all("a"):
|
73 |
out.append([{"LINK TITLE":p.get('title'),"URL":p.get('href'),"STRING":p.string}])
|
|
|
63 |
#source = urllib.request.urlopen(url).read()
|
64 |
soup = bs4.BeautifulSoup(source.content,'lxml')
|
65 |
|
66 |
+
rawp=(f'{soup.text}\n')
|
67 |
cnt=0
|
68 |
cnt+=len(rawp)
|
69 |
out.append(rawp)
|
70 |
+
#out.append("HTML fragments: ")
|
71 |
q=("a","p","span","content","article")
|
72 |
for p in soup.find_all("a"):
|
73 |
out.append([{"LINK TITLE":p.get('title'),"URL":p.get('href'),"STRING":p.string}])
|