Skip to content

Commit 7e0acf1

Browse files
committed
🔧 配置:调整flake8的max-line-length为88
⬆️ 版本:更新版本号至24.10.8 🐛 修复:修正baidu/main.py中remain字段拼写错误 ✨ 功能:更改mimotion/main.py中时间获取API接口
1 parent 4067f3c commit 7e0acf1

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
max-line-length = 120
2+
max-line-length = 88
33
max-complexity = 24
44
ignore = F401, W503, E203, E501, F841, E722, C901
55
exclude =

dailycheckin/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "24.5.15"
1+
__version__ = "24.10.8"

dailycheckin/baidu/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ def __init__(self, check_item: dict):
1717
def url_submit(data_url: str, submit_url: str, times: int = 100) -> str:
1818
site = parse.parse_qs(parse.urlsplit(submit_url).query).get("site")[0]
1919
urls_data = requests.get(url=data_url)
20-
remian = 100000
20+
remain = 100000
2121
success_count = 0
2222
error_count = 0
2323
for one in range(times):
2424
try:
2525
response = requests.post(url=submit_url, data=urls_data)
2626
if response.json().get("success"):
27-
remian = response.json().get("remain")
27+
remain = response.json().get("remain")
2828
success_count += response.json().get("success")
2929
else:
3030
error_count += 1
@@ -33,7 +33,7 @@ def url_submit(data_url: str, submit_url: str, times: int = 100) -> str:
3333
error_count += 1
3434
msg = [
3535
{"name": "站点地址", "value": site},
36-
{"name": "剩余条数", "value": remian},
36+
{"name": "剩余条数", "value": remain},
3737
{"name": "成功条数", "value": success_count},
3838
{"name": "成功次数", "value": times - error_count},
3939
{"name": "失败次数", "value": error_count},

dailycheckin/mimotion/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def __init__(self, check_item):
1919
}
2020

2121
def get_time(self):
22-
url = "http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp"
22+
url = "https://f.m.suning.com/api/ct.do"
2323
response = requests.get(url, headers=self.headers).json()
24-
t = response["data"]["t"]
24+
t = response["currentTime"]
2525
return t
2626

2727
def get_app_token(self, login_token):

0 commit comments

Comments
 (0)