headless off

This commit is contained in:
jxxghp 2023-06-12 23:05:56 +08:00
parent 21b1f1a9c1
commit 5a4c6c8a74
2 changed files with 8 additions and 6 deletions

View File

@ -11,7 +11,7 @@ class PlaywrightHelper:
cookies: str = None,
ua: str = None,
proxies: dict = None,
headless: bool = True,
headless: bool = False,
timeout: int = 30) -> str:
"""
获取网页源码

View File

@ -172,11 +172,13 @@ class SiteStatistic(_PluginBase):
logger.error(f"站点 {site_name} 无法访问:{url}")
return None
# 解析站点类型
site_schema = self.__build_class(html_text)
if not site_schema:
logger.error("站点 %s 无法识别站点类型" % site_name)
return None
return site_schema(site_name, url, site_cookie, html_text, session=session, ua=ua, proxy=proxy)
if html_text:
site_schema = self.__build_class(html_text)
if not site_schema:
logger.error("站点 %s 无法识别站点类型" % site_name)
return None
return site_schema(site_name, url, site_cookie, html_text, session=session, ua=ua, proxy=proxy)
return None
def __refresh_site_data(self, site_info: CommentedMap) -> Optional[ISiteUserInfo]:
"""