|
import subprocess |
|
import sys |
|
|
|
|
|
def install_package(package): |
|
subprocess.check_call([sys.executable, "-m", "pip", "install", package]) |
|
|
|
|
|
install_package("flask") |
|
|
|
from flask import Flask, render_template_string |
|
|
|
app = Flask(__name__) |
|
|
|
@app.route('/') |
|
def index(): |
|
return render_template_string(''' |
|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="UTF-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title>Embed Webpage</title> |
|
<style> |
|
body, html { |
|
margin: 0; |
|
padding: 0; |
|
height: 100%; |
|
overflow: hidden; |
|
} |
|
iframe { |
|
position: absolute; |
|
width: 100%; |
|
height: 100%; |
|
border: none; |
|
} |
|
</style> |
|
</head> |
|
<body> |
|
<iframe src="http://101.132.98.120:10003/"></iframe> |
|
</body> |
|
</html> |
|
''') |
|
|
|
if __name__ == '__main__': |
|
app.run(debug=True) |
|
|