Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def search_fn(query):
|
|
15 |
out = (re.split(":(?=http)",link["href"].replace("/url?q=","").split("&sa",1)[0]))
|
16 |
out = out[0]
|
17 |
|
18 |
-
frame_l=f'<div class="
|
19 |
|
20 |
file.writelines(frame_l)
|
21 |
|
@@ -37,9 +37,25 @@ def test(inp):
|
|
37 |
with open("myfile.txt", "r") as file1:
|
38 |
html_out = file1.read()
|
39 |
style = '''
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
out = f'''<!DOCTYPE html>
|
44 |
<html lang="en">
|
45 |
<head>
|
|
|
15 |
out = (re.split(":(?=http)",link["href"].replace("/url?q=","").split("&sa",1)[0]))
|
16 |
out = out[0]
|
17 |
|
18 |
+
frame_l=f'<div class="container"><iframe class="responsive-iframe" src="{out}" frameborder="0" width="100%" height="2000"></iframe></div>'
|
19 |
|
20 |
file.writelines(frame_l)
|
21 |
|
|
|
37 |
with open("myfile.txt", "r") as file1:
|
38 |
html_out = file1.read()
|
39 |
style = '''
|
40 |
+
.container {
|
41 |
+
position: relative;
|
42 |
+
overflow: hidden;
|
43 |
+
width: 100%;
|
44 |
+
padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
|
45 |
+
}
|
46 |
+
|
47 |
+
/* Then style the iframe to fit in the container div with full height and width */
|
48 |
+
.responsive-iframe {
|
49 |
+
position: absolute;
|
50 |
+
top: 0;
|
51 |
+
left: 0;
|
52 |
+
bottom: 0;
|
53 |
+
right: 0;
|
54 |
+
width: 100%;
|
55 |
+
height: 100%;
|
56 |
+
}
|
57 |
+
|
58 |
+
'''
|
59 |
out = f'''<!DOCTYPE html>
|
60 |
<html lang="en">
|
61 |
<head>
|