简单的request爬取

#!/usr/bin/python
# -*- coding:UTF-8 -*-

import urllib.request
import urllib

request = urllib.request.Request("http://www.brainjar.com/java/host/test.html")
page = urllib.request.urlopen(request)
text = page.read().decode("utf8")
print(text)

你可能感兴趣的:(简单的request爬取)