Spaces:
Runtime error
Runtime error
Update i_search.py
Browse files- i_search.py +5 -4
i_search.py
CHANGED
@@ -17,10 +17,11 @@ def i_search(url):
|
|
17 |
response.raise_for_status()
|
18 |
soup = BeautifulSoup(response.content, 'html.parser')
|
19 |
out = 'URL Links:\n'.join([p.text for p in soup.find_all('a')])
|
20 |
-
|
21 |
-
if out == "" or out == None:
|
22 |
-
|
23 |
-
|
|
|
24 |
return out
|
25 |
except Exception as e:
|
26 |
print (e)
|
|
|
17 |
response.raise_for_status()
|
18 |
soup = BeautifulSoup(response.content, 'html.parser')
|
19 |
out = 'URL Links:\n'.join([p.text for p in soup.find_all('a')])
|
20 |
+
out1 = ' '.join([p.text for p in soup.find_all('p')])
|
21 |
+
#if out == "" or out == None:
|
22 |
+
out2 = ' '.join([p.text for p in soup.find_all('article')])
|
23 |
+
out = f'{out}\n{out1}\n{out2}'
|
24 |
+
|
25 |
return out
|
26 |
except Exception as e:
|
27 |
print (e)
|