简单python爬虫
#!/usr/bin/env python2
#-*- coding: utf-8 -*-
import urllib
url = "http://www.baidu.com"
def getHtml(url):
page = urllib.urlopen(url)
html = page.read()
print html
if __name__ == "__main__":
getHtml(url)
posted on 2015-06-25 15:00 DayAfterDay 阅读(154) 评论(0) 编辑 收藏 举报