import redis
rclient = redis.Redis(host='127.0.0.1', port='6379')
# 获取所有账号
for key in rclient.keys('account:zyzx:*'):
group = key.decode('utf-8').split(':')
username = group[2]
info = {
'username': username,
'password': rclient.get('account:zyzx:%s' % username).decode('utf-8')
}
print(info)
import redis
b = []
rclient = redis.Redis(host='127.0.0.1', port='6379')
for key in rclient.keys('cookies:shuidi:*'):
group = key.decode('utf-8').split(':')
if len(group) == 3:
username = group[2]
cookies = rclient.get('cookies:shuidi:{}'.format(username))
cookies = eval(cookies)
b.append(cookies)
print(b[: 50])
print('----------------------')
print(b[50:])