mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-22 23:16:47 +00:00
fix exception
This commit is contained in:
@@ -641,12 +641,15 @@ class ContractCheck(_PluginBase):
|
||||
html_text = res.text
|
||||
if not html_text:
|
||||
return None
|
||||
else:
|
||||
elif res is not None:
|
||||
logger.error(
|
||||
"站点 %s 被反爬限制:%s, 状态码:%s"
|
||||
% (site_name, url, res.status_code)
|
||||
)
|
||||
return None
|
||||
else:
|
||||
logger.error(f"站点 {site_name} 无法访问:{url}")
|
||||
return None
|
||||
|
||||
# 兼容假首页情况,假首页通常没有 <link rel="search" 属性
|
||||
if '"search"' not in html_text and '"csrf-token"' not in html_text:
|
||||
|
||||
@@ -1095,9 +1095,12 @@ class SiteStatistic(_PluginBase):
|
||||
html_text = res.text
|
||||
if not html_text:
|
||||
return None
|
||||
else:
|
||||
elif res is not None:
|
||||
logger.error("站点 %s 被反爬限制:%s, 状态码:%s" % (site_name, url, res.status_code))
|
||||
return None
|
||||
else:
|
||||
logger.error("站点 %s 无法访问:%s" % (site_name, url))
|
||||
return None
|
||||
|
||||
# 兼容假首页情况,假首页通常没有 <link rel="search" 属性
|
||||
if '"search"' not in html_text and '"csrf-token"' not in html_text:
|
||||
|
||||
Reference in New Issue
Block a user