Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,19 +9,20 @@ def search_fn(query):
|
|
9 |
#links = soup.findAll("a")
|
10 |
|
11 |
links = soup.findAll("a")
|
12 |
-
|
|
|
13 |
for link in soup.find_all("a",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
|
14 |
out = (re.split(":(?=http)",link["href"].replace("/url?q=","").split("&sa",1)[0]))
|
15 |
out = out[0]
|
16 |
|
17 |
frame_l=f'<iframe src="{out}" frameborder="0" width="100%" height="2000"></iframe>'
|
18 |
|
19 |
-
|
20 |
-
file.writelines(frame_l)
|
21 |
-
file.close()
|
22 |
|
23 |
#print(file1.read())
|
24 |
print (out)
|
|
|
|
|
25 |
with open("myfile.txt", "r") as file1:
|
26 |
html_out = file1.read()
|
27 |
|
|
|
9 |
#links = soup.findAll("a")
|
10 |
|
11 |
links = soup.findAll("a")
|
12 |
+
file = open("myfile.txt", "w")
|
13 |
+
|
14 |
for link in soup.find_all("a",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
|
15 |
out = (re.split(":(?=http)",link["href"].replace("/url?q=","").split("&sa",1)[0]))
|
16 |
out = out[0]
|
17 |
|
18 |
frame_l=f'<iframe src="{out}" frameborder="0" width="100%" height="2000"></iframe>'
|
19 |
|
20 |
+
file.writelines(frame_l)
|
|
|
|
|
21 |
|
22 |
#print(file1.read())
|
23 |
print (out)
|
24 |
+
file.close()
|
25 |
+
|
26 |
with open("myfile.txt", "r") as file1:
|
27 |
html_out = file1.read()
|
28 |
|