import urllib
fun open():
return urllib.urlopen('http://example.com')
但是,當example.com打開它時,不會呈現css或js。我如何在網絡瀏覽器中打開網頁?如何在python中打開url
@error(404)
def error404(error):
return webbrowser.open('http://example.com')
我正在使用瓶子。給我的錯誤:TypeError("'bool' object is not iterable",)
它看起來像我們有語言斷開連接。 `error`裝飾器似乎期待可迭代。 webbrowswer.open會在瀏覽器中打開一個url並返回True或False,保留[command-query-separation](http://en.wikipedia.org/wiki/Command-query_separation)。你實際上並不想在browswer中打開這個頁面,是嗎? – aaronasterling 2010-11-29 08:54:47
你是否想在下載完html後下載javascript和css? – aaronasterling 2010-11-29 09:00:15