From 7e0acf1f98430855b37f2661b9dc04e8a326835f Mon Sep 17 00:00:00 2001 From: shitao <133397418@qq.com> Date: Tue, 8 Oct 2024 09:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20=E9=85=8D=E7=BD=AE=EF=BC=9A?= =?UTF-8?q?=E8=B0=83=E6=95=B4flake8=E7=9A=84max-line-length=E4=B8=BA88=20?= =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=E7=89=88=E6=9C=AC=EF=BC=9A=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7=E8=87=B324.10.8=20?= =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BF=AE=E6=AD=A3bai?= =?UTF-8?q?du/main.py=E4=B8=ADremain=E5=AD=97=E6=AE=B5=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=20=E2=9C=A8=20=E5=8A=9F=E8=83=BD=EF=BC=9A?= =?UTF-8?q?=E6=9B=B4=E6=94=B9mimotion/main.py=E4=B8=AD=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=8E=B7=E5=8F=96API=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .flake8 | 2 +- dailycheckin/__version__.py | 2 +- dailycheckin/baidu/main.py | 6 +++--- dailycheckin/mimotion/main.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.flake8 b/.flake8 index 70c5d94..4682093 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -max-line-length = 120 +max-line-length = 88 max-complexity = 24 ignore = F401, W503, E203, E501, F841, E722, C901 exclude = diff --git a/dailycheckin/__version__.py b/dailycheckin/__version__.py index cc7e686..30accb8 100755 --- a/dailycheckin/__version__.py +++ b/dailycheckin/__version__.py @@ -1 +1 @@ -__version__ = "24.5.15" +__version__ = "24.10.8" diff --git a/dailycheckin/baidu/main.py b/dailycheckin/baidu/main.py index 7bc66b1..420397b 100755 --- a/dailycheckin/baidu/main.py +++ b/dailycheckin/baidu/main.py @@ -17,14 +17,14 @@ class Baidu(CheckIn): def url_submit(data_url: str, submit_url: str, times: int = 100) -> str: site = parse.parse_qs(parse.urlsplit(submit_url).query).get("site")[0] urls_data = requests.get(url=data_url) - remian = 100000 + remain = 100000 success_count = 0 error_count = 0 for one in range(times): try: response = requests.post(url=submit_url, data=urls_data) if response.json().get("success"): - remian = response.json().get("remain") + remain = response.json().get("remain") success_count += response.json().get("success") else: error_count += 1 @@ -33,7 +33,7 @@ class Baidu(CheckIn): error_count += 1 msg = [ {"name": "站点地址", "value": site}, - {"name": "剩余条数", "value": remian}, + {"name": "剩余条数", "value": remain}, {"name": "成功条数", "value": success_count}, {"name": "成功次数", "value": times - error_count}, {"name": "失败次数", "value": error_count}, diff --git a/dailycheckin/mimotion/main.py b/dailycheckin/mimotion/main.py index 4f726e9..24437f0 100644 --- a/dailycheckin/mimotion/main.py +++ b/dailycheckin/mimotion/main.py @@ -19,9 +19,9 @@ class MiMotion(CheckIn): } def get_time(self): - url = "http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp" + url = "https://f.m.suning.com/api/ct.do" response = requests.get(url, headers=self.headers).json() - t = response["data"]["t"] + t = response["currentTime"] return t def get_app_token(self, login_token):