fix #777 豆瓣流控改为随机休眠3-10秒
This commit is contained in:
parent
93c473afe7
commit
4d900c2eb0
@ -449,7 +449,7 @@ class DoubanSync(_PluginBase):
|
||||
results = self.rsshelper.parse(url)
|
||||
if not results:
|
||||
logger.error(f"未获取到用户 {user_id} 豆瓣RSS数据:{url}")
|
||||
return
|
||||
continue
|
||||
# 解析数据
|
||||
for result in results:
|
||||
try:
|
||||
|
@ -581,8 +581,10 @@ class PersonMeta(_PluginBase):
|
||||
"""
|
||||
获取豆瓣演员信息
|
||||
"""
|
||||
# 随机休眠1-5秒
|
||||
time.sleep(1 + int(time.time()) % 5)
|
||||
# 随机休眠 3-10 秒
|
||||
sleep_time = 3 + int(time.time()) % 7
|
||||
logger.info(f"随机休眠 {sleep_time}秒 ...")
|
||||
time.sleep(sleep_time)
|
||||
# 匹配豆瓣信息
|
||||
doubaninfo = self.chain.match_doubaninfo(name=mediainfo.title,
|
||||
mtype=mediainfo.type.value,
|
||||
|
Loading…
x
Reference in New Issue
Block a user