Python爬虫 urllib库 POST 请求

import urllib.parse
import urllib.request

data = bytes(urllib.parse.urlencode({'page': 1}), encoding='GBK')
response = urllib.request.urlopen('http://www.lingzhilab.com/resources/getAllRes', data=data)
s=response.read()
print(s)

 

你可能感兴趣的:(Python爬虫)