mirror of
https://github.com/rachelos/we-mp-rss.git
synced 2026-09-24 16:02:42 +08:00
1.4.8-Fix
This commit is contained in:
@@ -113,8 +113,10 @@ class PlaywrightController:
|
||||
return self.page
|
||||
except Exception as e:
|
||||
print(f"浏览器启动失败: {str(e)}")
|
||||
tips="Docker环境;您可以设置环境变量INSTALL=True并重启Docker自动安装浏览器环境;如需要切换浏览器可以设置环境变量BROWSER_TYPE=firefox 支持(firefox,webkit,chromium),开发环境请手工安装"
|
||||
print(tips)
|
||||
self.cleanup()
|
||||
raise e
|
||||
raise Exception(tips)
|
||||
|
||||
def string_to_json(self, json_string):
|
||||
try:
|
||||
|
||||
+5
-1
@@ -798,7 +798,11 @@ class WeChatAPI:
|
||||
if rel==False:
|
||||
print_warning("未登录,Token登录失败")
|
||||
return rel
|
||||
|
||||
def QRcode(self):
|
||||
return {
|
||||
"code":f"/{self.wx_login_url}?t={(time.time())}",
|
||||
"is_exists":self.GetHasCode(),
|
||||
}
|
||||
def GetCode(self,CallBack=None,Notice=None):
|
||||
if self.GetHasCode():
|
||||
return {
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
from driver.wx import WX_API
|
||||
from driver.base import WX_API
|
||||
from core.config import cfg
|
||||
from jobs.notice import sys_notice
|
||||
from driver.success import Success
|
||||
@@ -7,18 +7,18 @@ def send_wx_code(title:str="",url:str=""):
|
||||
if cfg.get("server.send_code",False):
|
||||
WX_API.GetCode(Notice=CallBackNotice,CallBack=Success)
|
||||
pass
|
||||
def CallBackNotice():
|
||||
def CallBackNotice(data=None,ext_data=None):
|
||||
url=WX_API.QRcode()['code']
|
||||
svg="""
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
|
||||
<rect x="10" y="10" width="180" height="180" fill="#ffcc00" stroke="#000" stroke-width="2"/>
|
||||
</svg>
|
||||
"""
|
||||
rss_domain=cfg.get("rss.base_url","")
|
||||
rss_domain=str(cfg.get("rss.base_url",""))
|
||||
url=rss_domain+str(url)
|
||||
text=f"- 服务名:{cfg.get('server.name','')}\n"
|
||||
text+=f"- 发送时间: {time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))}"
|
||||
if WX_API.GetHasCode():
|
||||
text+=f""
|
||||
text+=f"\n- 请使用微信扫描二维码进行授权"
|
||||
sys_notice(text, cfg.get("server.code_title","WeRss授权过期,扫码授权"))
|
||||
sys_notice(text, str(cfg.get("server.code_title","WeRss授权过期,扫码授权")))
|
||||
Vendored
+2
-2
@@ -15,8 +15,8 @@
|
||||
<meta name="author" content="Rachel" />
|
||||
<script src="https://hm.baidu.com/hm.js?975de8724ac02eb7e6d2357bb95c067d"></script>
|
||||
<title>WeRss微信公众号订阅助手</title>
|
||||
<script type="module" crossorigin src="/assets/index.2f0e8a9a.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index.ca3815f0.css">
|
||||
<script type="module" crossorigin src="/assets/index.338a4504.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index.98841d7f.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user