how to open a url in python

后端 未结 7 1835
夕颜
夕颜 2020-12-22 19:01
import urllib

fun open():
    return urllib.urlopen(\'http://example.com\')

But when example.com opens it does not render css or js. How can I ope

7条回答
  •  情深已故
    2020-12-22 19:45

    with the webbrowser module

    import webbrowser
    
    webbrowser.open('http://example.com')  # Go to example.com
    

提交回复
热议问题