1 Star 2 Fork 0

LinWin-Cloud/SetoolLinux

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
websiteclone.py 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
LinWin-Cloud 提交于 2022-03-26 16:53 +08:00 . SetoolLinux
#the web site clone file
#use the html with iframe to clone the web site
def load():
print("")
print("")
print("finish the file websiteclone.py...")
print("finish the file set.py...")
print("finish the file setoollin.py...")
print("finish the file index.html...")
#to run the load()
load()
print("")
print("")
print("1:Html5 clone")
print("")
ch = input("Chose The Content_>")
if ch == "1":
url = input("Enter The Clone Url:")
surl = "'" + url + "'"
import os
os.system("rm -f index.html")
print("")
print("loading...")
print("clone the web site now...")
print("")
with open("index.html","a") as f:
#write the html file
f.write("<html>")
f.write("<head>")
f.write("</head>")
f.write("<body>")
f.write("<iframe style='width:100%;height:100%;background-color:aliceblue' src="+surl+"></iframe")
f.write("</body>")
f.close()
import os
print("start the http port 8080 on http://localhost:8080 and http://127.0.0.1:8080")
print("")
os.system("python3 -m http.server 8080")
#start the 8080 port
if ch == "exit":
import os
os.system("python3 setoollin.py")
else :
import os
os.system("python3 websiteclone.py")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/LinWin-Cloud/setoollinux.git
git@gitee.com:LinWin-Cloud/setoollinux.git
LinWin-Cloud
setoollinux
SetoolLinux
master

搜索帮助