mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
fix: /manager/notice
https://github.com/ltdrdata/ComfyUI-Manager/issues/372
This commit is contained in:
parent
a972a74df5
commit
d41b43fd12
15
__init__.py
15
__init__.py
@ -29,7 +29,7 @@ except:
|
||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||
|
||||
|
||||
version = [2, 5, 1]
|
||||
version = [2, 5, 2]
|
||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||
|
||||
@ -1833,14 +1833,11 @@ async def get_notice(request):
|
||||
url = "github.com"
|
||||
path = "/ltdrdata/ltdrdata.github.io/wiki/News"
|
||||
|
||||
conn = http.client.HTTPSConnection(url)
|
||||
conn.request("GET", path)
|
||||
|
||||
response = conn.getresponse()
|
||||
|
||||
try:
|
||||
async with aiohttp.ClientSession(trust_env=True, connector=aiohttp.TCPConnector(verify_ssl=False)) as session:
|
||||
async with session.get(f"https://{url}{path}") as response:
|
||||
if response.status == 200:
|
||||
html_content = response.read().decode('utf-8')
|
||||
# html_content = response.read().decode('utf-8')
|
||||
html_content = await response.text()
|
||||
|
||||
pattern = re.compile(r'<div class="markdown-body">([\s\S]*?)</div>')
|
||||
match = pattern.search(html_content)
|
||||
@ -1862,8 +1859,6 @@ async def get_notice(request):
|
||||
return web.Response(text="Unable to retrieve Notice", status=200)
|
||||
else:
|
||||
return web.Response(text="Unable to retrieve Notice", status=200)
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
@server.PromptServer.instance.routes.get("/manager/reboot")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user