分类: Python/Ruby
2015-09-15 16:59:54
wq41132015-09-16 11:25:01
浏览器
import urllib.request
def get():
weburl=\'http://xinsheng.huawei.com/cn/index.php?app=forum&mod=List&act=index&class=461\'
webheader={\'User-Agent\':\'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0\'}
req=urllib.request.Request(url=weburl,headers=webheader)
data=urllib.request.urlopen(req).read()
data=data.decode(\'UTF-8\')