import urllib
fun open():
return urllib.urlopen('http://example.com')
但是当example.com打开时,它不会呈现css或js。如何在web浏览器中打开网页?
@error(404)
def error404(error):
return webbrowser.open('http://example.com')
我在用瓶子。给我一个错误:TypeError("'bool' object is not iterable",)
Tags:
使用webbrowser模块
打开窗口
在macOS上
在Linux上
跨平台
使用默认浏览器显示url。如果new为0,则在可能的情况下在同一浏览器窗口中打开url。如果new为1,则会打开一个新的浏览器窗口(如果可能)。如果new为2,则可能会打开一个新的浏览器页(“选项卡”)。如果autoraise为True,则窗口将升高
在默认浏览器的新窗口中打开url
在默认浏览器的新页面(“选项卡”)中打开url
相关问题 更多 >
编程相关推荐