|
@@ -19,6 +19,8 @@ class SyncRedisHelper:
|
|
|
port=6379,
|
|
|
db=2,
|
|
|
password="Wqsd@2019",
|
|
|
+ # password="Qingqu2019",
|
|
|
+
|
|
|
)
|
|
|
return self._pool
|
|
|
|
|
@@ -47,16 +49,16 @@ def get_data(platform, out_video_id):
|
|
|
key = f"crawler:duplicate:{platform}:{out_video_id}"
|
|
|
helper = SyncRedisHelper()
|
|
|
client = helper.get_client()
|
|
|
- value = client.get(key)
|
|
|
+ value = client.exists(key)
|
|
|
return value
|
|
|
|
|
|
|
|
|
# 示例:存储一个数据
|
|
|
-# store_data('xiaoniangao', '12345')
|
|
|
+# store_data('xiaoniangao', '123457')
|
|
|
|
|
|
# 示例:获取一个数据
|
|
|
-value = get_data('xiaoniangao', '12345')
|
|
|
-if value is None:
|
|
|
- print("Value does not exist")
|
|
|
-else:
|
|
|
- print(f"Retrieved value: {value}")
|
|
|
+# value = get_data('xiaoniangao', '1234857')
|
|
|
+# if value is None:
|
|
|
+# print("Value does not exist")
|
|
|
+# else:
|
|
|
+# print(f"Retrieved value: {value}")
|