note

刚学python,今天接触两个模块:

1.webbrowser

2.urrlib

webbrowser用来打开新网页,用法是webbrowser.open_new_tab(url),若是需要关闭浏览器,则需要os.system('taskkill /F /IM ***.exe'),这是在windows

urllib主要用来做网络爬虫,可以用urllib.openurl(url).read(),读取网页html代码

原文地址:https://www.cnblogs.com/shiniantianlang/p/4451942.html