fix: 修改视频列表获取逻辑,支持级别 2 的请求以增加最大页数和限制
This commit is contained in:
parent
e587efcfd4
commit
cf74282459
4
DB.py
4
DB.py
@ -44,10 +44,10 @@ class DBVidcon:
|
|||||||
def push_record(self, data: dict):
|
def push_record(self, data: dict):
|
||||||
raw = json.dumps(data, ensure_ascii=False)
|
raw = json.dumps(data, ensure_ascii=False)
|
||||||
try:
|
try:
|
||||||
self.redis.lpush(self.record_list_key, raw)
|
self.redis.lpush(self.error_list_key, raw)
|
||||||
except redis.exceptions.ConnectionError:
|
except redis.exceptions.ConnectionError:
|
||||||
self.reconnect_redis()
|
self.reconnect_redis()
|
||||||
self.redis.lpush(self.record_list_key, raw)
|
self.redis.lpush(self.error_list_key, raw)
|
||||||
|
|
||||||
def fetch_records(self, count: int = 100):
|
def fetch_records(self, count: int = 100):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user