99from requests import get
1010
1111from src .Customizer import ERROR
12- from src .Customizer import GENERAL
1312from src .Customizer import WARNING
1413from src .Customizer import check_login
1514from src .Parameter import TtWid
@@ -29,7 +28,7 @@ def run(self):
2928 """提取 Cookie 并写入配置文件"""
3029 if not (
3130 cookie := self .console .input (
32- f"[ { GENERAL } ] 请粘贴 Cookie 内容:[/ { GENERAL } ] " )):
31+ " 请粘贴 Cookie 内容: " )):
3332 return
3433 self .extract (cookie )
3534
@@ -63,13 +62,13 @@ def extract(self, cookie: str, clean=True, return_=False):
6362 if return_ :
6463 return keys
6564 self .write (keys )
66- self .console .print ("写入 Cookie 成功!" , style = GENERAL )
65+ self .console .print ("写入 Cookie 成功!" )
6766
6867 def check_key (self , items ):
6968 if not items ["sessionid_ss" ]:
70- self .console .print ("当前 Cookie 未登录" , style = GENERAL )
69+ self .console .print ("当前 Cookie 未登录" )
7170 else :
72- self .console .print ("当前 Cookie 已登录" , style = GENERAL )
71+ self .console .print ("当前 Cookie 已登录" )
7372 keys_to_remove = [key for key , value in items .items () if value is None ]
7473 for key in keys_to_remove :
7574 del items [key ]
@@ -141,7 +140,7 @@ def generate_dict(data: str) -> dict:
141140
142141 def generate_qr_code (self , url : str ):
143142 qr_code = QRCode ()
144- assert url , "无效的登录二维码数据"
143+ # assert url, "无效的登录二维码数据"
145144 qr_code .add_data (url )
146145 qr_code .make (fit = True )
147146 qr_code .print_ascii (invert = True )
@@ -221,7 +220,7 @@ def get_cookie(self, url, cookie):
221220
222221 def wait (self ):
223222 sleep (2 )
224- self .console .print ("正在检查登录结果!" , style = GENERAL )
223+ self .console .print ("正在检查登录结果!" )
225224
226225 def request_data (self , json = True , ** kwargs ):
227226 try :
0 commit comments