Skip to content

Commit

Permalink
🔧 配置:调整flake8的max-line-length为88
Browse files Browse the repository at this point in the history
⬆️ 版本:更新版本号至24.10.8
🐛 修复:修正baidu/main.py中remain字段拼写错误
✨ 功能:更改mimotion/main.py中时间获取API接口
  • Loading branch information
Sitoi committed Oct 8, 2024
1 parent 4067f3c commit 7e0acf1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion dailycheckin/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "24.5.15"
__version__ = "24.10.8"
6 changes: 3 additions & 3 deletions dailycheckin/baidu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ def __init__(self, check_item: dict):
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
Expand All @@ -33,7 +33,7 @@ def url_submit(data_url: str, submit_url: str, times: int = 100) -> str:
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},
Expand Down
4 changes: 2 additions & 2 deletions dailycheckin/mimotion/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def __init__(self, check_item):
}

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):
Expand Down

0 comments on commit 7e0acf1

Please sign in to comment.