mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 13:48:03 +08:00
Compare commits
11 Commits
864e44b238
...
3337a270cb
Author | SHA1 | Date | |
---|---|---|---|
|
3337a270cb | ||
|
691bd89494 | ||
|
556783581a | ||
|
495bc9e026 | ||
|
5fa538e640 | ||
|
72729dade8 | ||
|
88edcba09c | ||
|
882289fbaf | ||
|
44081f6e45 | ||
|
3cb28a3471 | ||
|
2455ab8765 |
@ -44,12 +44,6 @@ repos:
|
||||
- id: isort
|
||||
args: ['--profile', 'black', '--filter-files']
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.13
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ['--fix', '--ignore', 'E722']
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.9.1
|
||||
hooks:
|
||||
|
13
README.md
13
README.md
@ -17,10 +17,11 @@
|
||||
[![][github-issues-shield]][github-issues-link]
|
||||
[![][github-contributors-shield]][github-contributors-link]
|
||||
|
||||
[![][python-version-shield]][python-version-link]
|
||||
[![][pypi-dm-shield]][pypi-dm-link]
|
||||
[![][docker-pull-shield]][docker-pull-link]
|
||||
[![][docker-size-shield]][docker-size-link]
|
||||
[![][docker-stars-shield]][docker-stars-link]
|
||||
[![][pypi-dm-shield]][pypi-dm-link]
|
||||
[![][github-license-shield]][github-license-link]
|
||||
|
||||
<!-- SHIELD GROUP -->
|
||||
@ -94,10 +95,12 @@
|
||||
|
||||
## 📝 License
|
||||
|
||||
This project is [MIT](./LICENSE) licensed.
|
||||
Copyright © 2021 [Sitoi][profile-link]. <br />
|
||||
This project is [MIT](https://github.com/Sitoi/dailycheckin/blob/main/LICENSE) licensed.
|
||||
|
||||
<!-- LINK GROUP -->
|
||||
|
||||
[profile-link]: https://github.com/sitoi
|
||||
[github-codespace-link]: https://codespaces.new/sitoi/dailycheckin
|
||||
[github-codespace-shield]: https://github.com/sitoi/dailycheckin/blob/main/images/codespaces.png?raw=true
|
||||
[github-contributors-link]: https://github.com/sitoi/dailycheckin/graphs/contributors
|
||||
@ -126,7 +129,9 @@ This project is [MIT](./LICENSE) licensed.
|
||||
[docker-stars-link]: https://hub.docker.com/repository/docker/sitoi/dailycheckin
|
||||
[pypi-dm-shield]: https://img.shields.io/pypi/dm/dailycheckin?label=pypi&labelColor=black&style=flat-square
|
||||
[pypi-dm-link]: https://pypi.org/project/dailycheckin/
|
||||
[python-version-link]: https://pypi.org/project/dailycheckin/
|
||||
[python-version-shield]: https://img.shields.io/pypi/pyversions/dailycheckin?labelColor=black&style=flat-square
|
||||
[pypi-version-shield]: https://img.shields.io/pypi/v/dailycheckin?labelColor=black&style=flat-square
|
||||
[pypi-version-link]: https://pypi.org/project/dailycheckin/
|
||||
[starchart-shield]: https://starchart.cc/Sitoi/dailycheckin.svg
|
||||
[starchart-link]: https://starchart.cc/Sitoi/dailycheckin
|
||||
[starchart-shield]: https://api.star-history.com/svg?repos=sitoi/dailycheckin&type=Date
|
||||
[starchart-link]: https://star-history.com/#sitoi/dailycheckin&Date
|
||||
|
@ -1 +1 @@
|
||||
__version__ = "24.2.27"
|
||||
__version__ = "24.3.7"
|
||||
|
@ -106,9 +106,7 @@ class IQIYI(CheckIn):
|
||||
msg = [{"name": "签到天数", "value": _msg}]
|
||||
else:
|
||||
try:
|
||||
msg = [
|
||||
{"name": "签到天数", "value": res["data"]["data"]["signDays"]}
|
||||
]
|
||||
msg = [{"name": "签到天数", "value": res["data"]["data"]["signDays"]}]
|
||||
except Exception as e:
|
||||
msg = [{"name": "签到天数", "value": str(e)}]
|
||||
else:
|
||||
@ -265,12 +263,7 @@ class IQIYI(CheckIn):
|
||||
url="https://act.vip.iqiyi.com/level-right/receive", data=data
|
||||
).json()
|
||||
msg = res["msg"]
|
||||
return [
|
||||
{
|
||||
"name": "V7 免费升级星钻",
|
||||
"value": msg,
|
||||
}
|
||||
]
|
||||
return [{"name": "V7 免费升级星钻", "value": msg}]
|
||||
|
||||
def start_watch(self, p00001, p00003, dfp):
|
||||
total_time = self.get_watch_time(p00001=p00001)
|
||||
|
@ -67,9 +67,8 @@ class SMZDM(CheckIn):
|
||||
url2 = "https://user-api.smzdm.com/checkin/all_reward"
|
||||
resp = requests.post(url=url2, headers=headers, data=data)
|
||||
result = resp.json()
|
||||
normal_reward = result["data"]["normal_reward"]
|
||||
msgs = []
|
||||
if normal_reward:
|
||||
if normal_reward := result["data"]["normal_reward"]:
|
||||
msgs = [
|
||||
{
|
||||
"name": "签到奖励",
|
||||
|
@ -3,7 +3,7 @@ import hashlib
|
||||
import hmac
|
||||
import json
|
||||
import time
|
||||
import urllib.parse
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
import requests
|
||||
|
||||
@ -90,7 +90,7 @@ def message2dingtalk(dingtalk_secret, dingtalk_access_token, content):
|
||||
hmac_code = hmac.new(
|
||||
secret_enc, string_to_sign_enc, digestmod=hashlib.sha256
|
||||
).digest()
|
||||
sign = urllib.parse.quote_plus(base64.b64encode(hmac_code))
|
||||
sign = quote_plus(base64.b64encode(hmac_code))
|
||||
send_data = {"msgtype": "text", "text": {"content": content}}
|
||||
requests.post(
|
||||
url="https://oapi.dingtalk.com/robot/send?access_token={}×tamp={}&sign={}".format(
|
||||
@ -106,6 +106,7 @@ def message2bark(bark_url: str, content):
|
||||
print("Bark 推送开始")
|
||||
if not bark_url.endswith("/"):
|
||||
bark_url += "/"
|
||||
content = quote_plus(content)
|
||||
url = f"{bark_url}{content}"
|
||||
headers = {"Content-type": "application/x-www-form-urlencoded"}
|
||||
requests.get(url=url, headers=headers)
|
||||
@ -125,8 +126,11 @@ def message2qywxapp(
|
||||
qywx_corpid, qywx_agentid, qywx_corpsecret, qywx_touser, qywx_media_id, qywx_origin, content
|
||||
):
|
||||
print("企业微信应用消息推送开始")
|
||||
bastUrl = "https://qyapi.weixin.qq.com"
|
||||
if qywx_origin:
|
||||
bastUrl = qywx_origin;
|
||||
res = requests.get(
|
||||
f"https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid={qywx_corpid}&corpsecret={qywx_corpsecret}"
|
||||
f"{bastUrl}/cgi-bin/gettoken?corpid={qywx_corpid}&corpsecret={qywx_corpsecret}"
|
||||
)
|
||||
token = res.json().get("access_token", False)
|
||||
if qywx_media_id:
|
||||
@ -159,16 +163,10 @@ def message2qywxapp(
|
||||
"btntxt": "开源项目",
|
||||
},
|
||||
}
|
||||
if qywx_origin:
|
||||
requests.post(
|
||||
url=f"{qywx_origin}/cgi-bin/message/send?access_token={token}",
|
||||
data=json.dumps(data),
|
||||
)
|
||||
else:
|
||||
requests.post(
|
||||
url=f"https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token={token}",
|
||||
data=json.dumps(data),
|
||||
)
|
||||
requests.post(
|
||||
url=f"{bastUrl}/cgi-bin/message/send?access_token={token}",
|
||||
data=json.dumps(data),
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
|
7
docs/pages/history/2024-03-07.mdx
Normal file
7
docs/pages/history/2024-03-07.mdx
Normal file
@ -0,0 +1,7 @@
|
||||
# 2024-03-07
|
||||
|
||||
![PyPI](https://img.shields.io/badge/Pypi-v24.3.7-brightgreen)
|
||||
|
||||
## 🐛 修复
|
||||
|
||||
- 修复「Bark」消息不通知的 BUG
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"2024-03-07": "2024-03-07",
|
||||
"2024-02-27": "2024-02-27",
|
||||
"2024-02-22": "2024-02-22",
|
||||
"2024-02-20": "2024-02-20",
|
||||
|
@ -23,10 +23,11 @@
|
||||
[![][github-issues-shield]][github-issues-link]
|
||||
[![][github-contributors-shield]][github-contributors-link]
|
||||
|
||||
[![][python-version-shield]][python-version-link]
|
||||
[![][pypi-dm-shield]][pypi-dm-link]
|
||||
[![][docker-pull-shield]][docker-pull-link]
|
||||
[![][docker-size-shield]][docker-size-link]
|
||||
[![][docker-stars-shield]][docker-stars-link]
|
||||
[![][pypi-dm-shield]][pypi-dm-link]
|
||||
[![][github-license-shield]][github-license-link]
|
||||
|
||||
<!-- SHIELD GROUP -->
|
||||
@ -100,10 +101,12 @@
|
||||
|
||||
## 📝 License
|
||||
|
||||
This project is [MIT](./LICENSE) licensed.
|
||||
Copyright © 2021 [Sitoi][profile-link]. <br />
|
||||
This project is [MIT](https://github.com/Sitoi/dailycheckin/blob/main/LICENSE) licensed.
|
||||
|
||||
<!-- LINK GROUP -->
|
||||
|
||||
[profile-link]: https://github.com/sitoi
|
||||
[github-codespace-link]: https://codespaces.new/sitoi/dailycheckin
|
||||
[github-codespace-shield]: https://github.com/sitoi/dailycheckin/blob/main/images/codespaces.png?raw=true
|
||||
[github-contributors-link]: https://github.com/sitoi/dailycheckin/graphs/contributors
|
||||
@ -132,7 +135,9 @@ This project is [MIT](./LICENSE) licensed.
|
||||
[docker-stars-link]: https://hub.docker.com/repository/docker/sitoi/dailycheckin
|
||||
[pypi-dm-shield]: https://img.shields.io/pypi/dm/dailycheckin?label=pypi&labelColor=black&style=flat-square
|
||||
[pypi-dm-link]: https://pypi.org/project/dailycheckin/
|
||||
[python-version-link]: https://pypi.org/project/dailycheckin/
|
||||
[python-version-shield]: https://img.shields.io/pypi/pyversions/dailycheckin?labelColor=black&style=flat-square
|
||||
[pypi-version-shield]: https://img.shields.io/pypi/v/dailycheckin?labelColor=black&style=flat-square
|
||||
[pypi-version-link]: https://pypi.org/project/dailycheckin/
|
||||
[starchart-shield]: https://starchart.cc/Sitoi/dailycheckin.svg
|
||||
[starchart-link]: https://starchart.cc/Sitoi/dailycheckin
|
||||
[starchart-shield]: https://api.star-history.com/svg?repos=sitoi/dailycheckin&type=Date
|
||||
[starchart-link]: https://star-history.com/#sitoi/dailycheckin&Date
|
||||
|
@ -87,8 +87,9 @@ import { Steps } from 'nextra/components'
|
||||
## 获取方式
|
||||
|
||||
<Steps>
|
||||
|
||||
### 打开官网
|
||||
|
||||
|
||||
进入[阿里云盘](https://www.aliyundrive.com/drive/)
|
||||
|
||||
### 打开开发者工具
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Cards, Card } from 'nextra/components'
|
||||
import { Callout } from 'nextra/components'
|
||||
|
||||
<Cards>
|
||||
<Card
|
||||
@ -49,6 +50,10 @@ import { Cards, Card } from 'nextra/components'
|
||||
|
||||
# BARK
|
||||
|
||||
<Callout type="warning">
|
||||
通知消息在 Bark 有长度限制,如果没收到推送,请将 MERGE_PUSH 改为 false
|
||||
</Callout>
|
||||
|
||||
### 配置示例
|
||||
|
||||
```json filename="config.json" copy
|
||||
|
@ -70,4 +70,5 @@ import { Cards, Card } from 'nextra/components'
|
||||
| _**QYWX_CORPSECRET**_ | corpsecret |
|
||||
| _**QYWX_TOUSER**_ | touser |
|
||||
| _**QYWX_MEDIA_ID**_ | media_id |
|
||||
| _**QYWX_ORIGIN**_ | 企业微信反向代理地址 https://qyapi.weixin.qq.com/cgi-bin/gettoken将其中的https://qyapi.weixin.qq.com替换为**QYWX_ORIGIN** |
|
||||
| _**MERGE_PUSH**_ | **true**: 将推送消息合并;**false**: 分开推送 |
|
||||
|
@ -72,13 +72,13 @@ const config: DocsThemeConfig = {
|
||||
}
|
||||
},
|
||||
banner: {
|
||||
key: '2024.2.27-release',
|
||||
key: '2024.3.7-release',
|
||||
text: (
|
||||
<a
|
||||
href="/dailycheckin/history/2024-02-27/"
|
||||
href="/dailycheckin/history/2024-03-07/"
|
||||
target="_blank"
|
||||
>
|
||||
🎉 DailyCheckIn 2024.2.27 is released. Read more →
|
||||
🎉 DailyCheckIn 2024.3.7 is released. Read more →
|
||||
</a>
|
||||
),
|
||||
},
|
||||
|
@ -127,9 +127,7 @@ def login(mobile: str, v_code: str):
|
||||
|
||||
def get_location():
|
||||
while 1:
|
||||
location = input(
|
||||
"请输入精确小区位置,例如[小区名称],为你自动预约附近的门店:"
|
||||
).strip()
|
||||
location = input("请输入精确小区位置,例如[小区名称],为你自动预约附近的门店:").strip()
|
||||
selects = select_geo(location)
|
||||
|
||||
a = 0
|
||||
|
6
setup.py
6
setup.py
@ -7,7 +7,7 @@ FOLDER = "dailycheckin"
|
||||
DESCRIPTION = "dailycheckin"
|
||||
EMAIL = "133397418@qq.com"
|
||||
AUTHOR = "Sitoi"
|
||||
REQUIRES_PYTHON = ">=3.6.0"
|
||||
REQUIRES_PYTHON = ">=3.9.0"
|
||||
VERSION = None
|
||||
|
||||
|
||||
@ -73,10 +73,8 @@ setup(
|
||||
entry_points={"console_scripts": ["dailycheckin = dailycheckin.main:checkin"]},
|
||||
classifiers=[
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: Python :: Implementation :: PyPy",
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user