#coding=utf-8
import urllib
import re
def getHtml(url):
page = urllib.urlopen(url)
html = page.read()
return html
html = getHtml("http://www.xxx.com/ ")
f = file('html.txt','w')
f.write(html)
f.close()
返回的Access denied。。查了以下是浏览器不被支持。但是在爬虫下要怎么写?