关于Python爬虫入门(http请求 request和requests)
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