#coding=utf-8
import redis
import requests
#安装模块redis 和scrapy-redis
dbredis = redis.Redis(host="127.0.0.1",port=6379,password="")
try:
dbredis.setex(name="spidertest",value="nihaoa",time=30)
except Exception as ex:
print "qwe"
网友评论