From 283c286b64393adbbbe31ec5afd8ddec8791fffa Mon Sep 17 00:00:00 2001 From: rm Date: Tue, 26 Mar 2024 18:27:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=80=E4=BA=9B=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PT/pt_config.toml | 6 ++++-- PT/pt_operation.py | 7 +++++-- junit/pt_operation_junit.py | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/PT/pt_config.toml b/PT/pt_config.toml index 460e314..fcce358 100644 --- a/PT/pt_config.toml +++ b/PT/pt_config.toml @@ -99,7 +99,7 @@ label = "" ['qingwa 青蛙'] url = "https://new.qingwa.pro" -cookie = "" +cookie = "c_secure_uid=NzAwNDM1; c_secure_pass=303b3da242041150d56526f166213c86; c_secure_ssl=eWVhaA%3D%3D; c_secure_tracker_ssl=eWVhaA%3D%3D; c_secure_login=bm9wZQ%3D%3D; cf_clearance=wdgkQgafh7Z.ytwVM8FEqLmC8zJFNONOigtAeQ2z81Y-1711447677-1.0.1.1-tQRzJ56wcynWEAA1puQZEVgcWE2qfdGN4R.VqITW9IQuHfLIZDI5JSrTxAbDI3O.gAf1gs9lYZF0QMG5tUugqA" level = 3 label = "" @@ -122,7 +122,8 @@ label = "9kg" url = "https://fsm.name" cookie = "" level = 2 -label = "9kg" +label = "纯9kg站点、json数据格式、日本AV、国产AV、AV动漫" +flag = 1 ['ilolicon 萝莉控 ' ] url = "https://share.ilolicon.com" @@ -148,6 +149,7 @@ url = "https://kp.m-team.cc" cookie = "" level = 1 label = "9kg" +flag = 1 ['NicePT 老师 ' ] url = "https://www.nicept.net" diff --git a/PT/pt_operation.py b/PT/pt_operation.py index a5bcffa..0ec3bb2 100644 --- a/PT/pt_operation.py +++ b/PT/pt_operation.py @@ -95,6 +95,9 @@ class PtOperation: pushme("开注提醒" + section_name, remind_me) pushplus_bot("开注提醒" + section_name, remind_me) logger.info(remind_me) + elif "对不起" in html or ("关闭" in html and "自由注册" in html) or "维护" in html: + remind_me = f"现在 {text} 关闭注册,请知晓~!" + logger.info(remind_me) else: soup = BeautifulSoup(html, 'html.parser') text_content = soup.find(class_='text').get_text() @@ -108,6 +111,7 @@ class PtOperation: for _ in range(5): try: response = requests.get(url, headers=self.headers, timeout=5 * 60) + response.encoding = "utf-8" if response.status_code == 403 or response.text in "Just a moment": return self.flaresolverr_get(url, text) elif response.status_code == 200: @@ -138,7 +142,7 @@ class PtOperation: response = requests.post(flaresolverr_url, headers=headers, data=payload) res = json.loads(response.text) if res['status'] == 'ok' and res['solution']['status'] == 200: - logging.info(f"最终耗时:{(res['endTimestamp'] - res['startTimestamp'])/ 1000 / 60:.2f} 分钟") + logging.info(f"最终耗时:{(res['endTimestamp'] - res['startTimestamp']) / 1000 / 60:.2f} 分钟") return res['solution']['response'] elif res['status'] == 'error': logger.error(f"{text} , 访问返回 {res['message']} !!!") @@ -166,4 +170,3 @@ class PtOperation: print(f"Error: The file '{self.toml_file}' was not found.") except toml.TomlDecodeError as e: print(f"Error decoding TOML: {e}") - diff --git a/junit/pt_operation_junit.py b/junit/pt_operation_junit.py index bfcfa78..b899953 100644 --- a/junit/pt_operation_junit.py +++ b/junit/pt_operation_junit.py @@ -33,5 +33,5 @@ def signup_junit(name): PtOperation().signup(section_name, section_data) -attendances_junit("btschool") -# signup_junit("1PTBar/壹PT") +# attendances_junit("btschool") +signup_junit("OurBits【我堡】")