1、urllib.request
#coding=utf-8 #welcome = "hello, jzh" #print (welcome) ''' 测试爬虫 ''' import urllib.request response = urllib.request.urlopen('https://chanpinxue.cn/about') result = response.read().decode('utf-8') print(result)
2、requests
import requests url = 'http://chanpinxue.cn/about' res = requests.get(url).text print(res)