猫史档案馆


【Python作品分享】网页打开系统【作品秀】

用户:流星猫YZUk流星猫YZUk查看:2 回复:3 评论:2 创建时间:2020-01-11T14:39:11


【作品展示】

center_image

 

【作品介绍】

网页打开系统

 

【作品源代码】

import easygui
import time
import webbrowser
from webbrowser import open as open_the_web


if easygui.ynbox('请问你要打开哪个网站?(默认使用360安全浏览器打开)', 'Codemao', ('编程猫社区', '通天塔')):
    try:
        print('正在使用360安全浏览器打开编程猫社区……')
        time.sleep(1)
        open_the_web("360se6")
        webbrowser.open("https://shequ.codemao.cn")
    except NameError:
        print('你的电脑没有安装360安全浏览器')
        time.sleep(1)
        if easygui.ynbox('你的电脑没有安装360安全浏览器,是否使用2345加速浏览器打开编程猫社区?', 'Codemao', ('是', '否')):
            try:
                print('正在使用2345加速浏览器打开编程猫社区……')
                time.sleep(1)
                open_the_web("2345Explorer")
                webbrowser.open("https://shequ.codemao.cn")
            except NameError:
                print('你的电脑没有安装2345加速浏览器')
                time.sleep(1)
                easygui.msgbox('你的电脑没有安装2345加速浏览器,打开失败。', 'Codemao', '确定')
else:
    try:
        print('正在使用360安全浏览器打开通天塔')
        time.sleep(1)
        open_the_web("360se6")
        webbrowser.open("https://tob.codemao.cn")
    except NameError:
        print('你的电脑没有安装360安全浏览器')
        time.sleep(1)
        if easygui.ynbox('你的电脑没有安装360安全浏览器,是否使用2345加速浏览器打开通天塔?', 'Codemao', ('是', '否')):
            try:
                print('正在使用2345加速浏览器打开通天塔……')
                time.sleep(1)
                open_the_web("2345Explorer")
                webbrowser.open("https://tob.codemao.cn")
            except NameError:
                print('你的电脑没有安装2345加速浏览器')
                time.sleep(1)
                easygui.msgbox('你的电脑没有安装2345加速浏览器,打开失败。', 'Codemao', '确定')

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
蓝冰小狼蓝冰小狼

emotion_编程猫_点赞

点赞0


评论


GG小杨GG小杨

用不了,明明安装着有360浏览器他却说没有

点赞0


评论


树林归来树林归来

挖坟( )

点赞0


评论