python 操作浏览器打开指定网页

#! /usr/bin/env python
# encoding=utf8
import webbrowser
import time
webbrowser.open("http://www.baidu.com")
# wait a while, and then go to another page
time.sleep(5)
webbrowser.open("http://www.taobao.com")

  

webbrowser 模块提供了一个到系统标准 web 浏览器的接口. 它 提供了一个 open 函数, 接受文件名或 URL 作为参数, 然后在浏览器中打开它. 如果你又一次调用 open 函数, 那么它会尝试在相同的窗口打开新页面 

原文地址:https://www.cnblogs.com/sea-stream/p/9723553.html