标签:
Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. ——Redis Home Page
redis-server redis.conf
redis-cli flushdb
SCHEDULER = "scrapy_redis.scheduler.Scheduler"
SCHEDULER_PERSIST =True
SCHEDULER_QUEUE_CLASS = ‘scrapy_redis.queue.SpiderPriorityQueue‘
REDIS_URL = None
REDIS_HOST = ‘127.0.0.1‘ #REDIS服务器的ip
REDIS_PORT = 6379 #REDIS服务器端口
from scrapy_redis.spiders import RedisSpider
class xxx(RedisSpider):
..................
redis_key = ‘username:password‘
..................
标签:
原文地址:http://www.cnblogs.com/XBlack/p/5628151.html