#install cookie
cj = cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
urllib.request.install_opener(opener)
#build request for accessed url
homeReq = urllib.request.Request(
url = csdnAccessModuleUrl
)
用requests库发送一次post请求,只要把字符串写在表单里面就可以了。 import requestsdata = {key:str}#表单用字典格式,字符串作为valuer = requests.post(url,data=data)欢迎分享,转载请注明来源:内存溢出
评论列表(0条)