Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,12 +6,12 @@ import re
|
|
| 6 |
def search_fn(query):
|
| 7 |
page = requests.get(f"https://www.google.com/search?q={query}")
|
| 8 |
soup = BeautifulSoup(page.content)
|
| 9 |
-
links = soup.findAll("a")
|
| 10 |
|
| 11 |
links = soup.findAll("a")
|
| 12 |
for link in soup.find_all("a",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
|
| 13 |
out = (re.split(":(?=http)",link["href"].replace("/url?q=","")))
|
| 14 |
-
|
| 15 |
#return out
|
| 16 |
|
| 17 |
|
|
|
|
| 6 |
def search_fn(query):
|
| 7 |
page = requests.get(f"https://www.google.com/search?q={query}")
|
| 8 |
soup = BeautifulSoup(page.content)
|
| 9 |
+
#links = soup.findAll("a")
|
| 10 |
|
| 11 |
links = soup.findAll("a")
|
| 12 |
for link in soup.find_all("a",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
|
| 13 |
out = (re.split(":(?=http)",link["href"].replace("/url?q=","")))
|
| 14 |
+
print (out)
|
| 15 |
#return out
|
| 16 |
|
| 17 |
|