小爬虫的学习01

Python 使用第三方库函数及简单网页爬虫示例

# -*- coding: utf-8 -*-
import urllib
import webbrowser as web
url = "http://www.163.com"
content = urllib.urlopen(url).read()
open("myweb.html","w").write(content)
web.open_new_tab('myweb.html') #在默认浏览器里打开一个新标签

原文地址:https://www.cnblogs.com/fjl-vxee/p/5690538.html