☁️ Use remote birthday

This commit is contained in:
omg-xtao 2023-02-28 22:15:48 +08:00 committed by GitHub
parent fe4940034c
commit 18d2590374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 154 additions and 104 deletions

View File

@ -39,6 +39,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install --upgrade poetry
pip install git+https://github.com/pypa/installer.git
poetry config virtualenvs.create false
poetry install
poetry install --extras test

View File

@ -6,8 +6,8 @@ from httpx import AsyncClient
from core.base.assets import AssetsService
from metadata.genshin import AVATAR_DATA
from metadata.scripts.metadatas import RESOURCE_DEFAULT_PATH
from metadata.shortname import roleToId
from modules.apihelper.client.components.remote import Remote
from modules.apihelper.models.genshin.calendar import Date, FinalAct, ActEnum, ActDetail, ActTime, BirthChar
from modules.wiki.character import Character
@ -27,7 +27,6 @@ class Calendar:
"uid": "100000000",
}
MIAO_API = "http://miaoapi.cn/api/calendar"
REMOTE_API = f"https://raw.fastgit.org/{RESOURCE_DEFAULT_PATH}calendar.json"
IGNORE_IDS = [
495, # 有奖问卷调查开启!
1263, # 米游社《原神》专属工具一览
@ -41,7 +40,15 @@ class Calendar:
def __init__(self):
self.client = AsyncClient()
self.birthday_list = self.gen_birthday_list()
@staticmethod
async def async_gen_birthday_list() -> Dict[str, List[str]]:
"""生成生日列表并且合并云端生日列表"""
birthday_list = Calendar.gen_birthday_list()
remote_data = await Remote.get_remote_birthday()
if remote_data:
birthday_list.update(remote_data)
return birthday_list
@staticmethod
def gen_birthday_list() -> Dict[str, List[str]]:
@ -73,9 +80,8 @@ class Calendar:
if req.status_code == 200:
miao_data = req.json()
time_map.update({key: ActTime(**value) for key, value in miao_data.get("data", {}).items()})
req = await self.client.get(self.REMOTE_API)
if req.status_code == 200:
remote_data = req.json()
remote_data = await Remote.get_remote_calendar()
if remote_data:
time_map.update({key: ActTime(**value) for key, value in remote_data.get("data", {}).items()})
return new_list_data, time_map
@ -266,13 +272,14 @@ class Calendar:
self, date_list: List[Date], assets: AssetsService
) -> Tuple[int, Dict[str, Dict[str, List[BirthChar]]]]:
"""获取生日角色"""
birthday_list = await self.async_gen_birthday_list()
birthday_char_line = 0
birthday_chars = {}
for date in date_list:
birthday_chars[str(date.month)] = {}
for d in date.date:
key = f"{date.month}_{d}"
if char := self.birthday_list.get(key):
if char := birthday_list.get(key):
birthday_char_line = max(len(char), birthday_char_line)
birthday_chars[str(date.month)][str(d)] = []
for c in char:

View File

@ -0,0 +1,37 @@
from typing import List, Dict
from httpx import AsyncClient, HTTPError
from metadata.scripts.metadatas import RESOURCE_DEFAULT_PATH
class Remote:
"""拉取云控资源"""
BASE_URL = f"https://raw.fastgit.org/{RESOURCE_DEFAULT_PATH}"
CALENDAR = f"{BASE_URL}calendar.json"
BIRTHDAY = f"{BASE_URL}birthday.json"
@staticmethod
async def get_remote_calendar() -> Dict[str, Dict]:
"""获取云端日历"""
try:
async with AsyncClient() as client:
req = await client.get(Remote.CALENDAR)
if req.status_code == 200:
return req.json()
return {}
except HTTPError:
return {}
@staticmethod
async def get_remote_birthday() -> Dict[str, List[str]]:
"""获取云端生日"""
try:
async with AsyncClient() as client:
req = await client.get(Remote.BIRTHDAY)
if req.status_code == 200:
return req.json()
return {}
except HTTPError:
return {}

View File

@ -49,11 +49,15 @@ class BirthdayPlugin(Plugin, BasePlugin):
cookie_service: CookiesService = None,
):
"""Load Data."""
self.birthday_list = Calendar.gen_birthday_list()
self.birthday_list = {}
self.user_service = user_service
self.cookie_service = cookie_service
def get_today_birthday(self) -> List[str]:
async def __async_init__(self):
self.birthday_list = await Calendar.async_gen_birthday_list()
self.birthday_list.get("6_1", []).append("派蒙")
async def get_today_birthday(self) -> List[str]:
key = (
rm_starting_str(datetime.now().strftime("%m"), "0")
+ "_"
@ -83,9 +87,6 @@ class BirthdayPlugin(Plugin, BasePlugin):
key = f"{month}_{day}"
day_list = self.birthday_list.get(key, [])
date = f"{month}{day}"
if key == "6_1":
text = f"{date} 是 派蒙、{''.join(day_list)} 的生日哦~"
else:
text = f"{date}{''.join(day_list)} 的生日哦~" if day_list else f"{date} 没有角色过生日哦~"
except IndexError:
text = "请输入正确的日期格式如1-1或输入正确的角色名称。"
@ -114,10 +115,7 @@ class BirthdayPlugin(Plugin, BasePlugin):
self._add_delete_message_job(context, reply_message.chat_id, reply_message.message_id)
else:
logger.info(f"用户 {user.full_name}[{user.id}] 查询今日角色生日列表")
today_list = self.get_today_birthday()
if key == "6_1":
text = f"今天是 派蒙、{''.join(today_list)} 的生日哦~"
else:
today_list = await self.get_today_birthday()
text = f"今天是 {''.join(today_list)} 的生日哦~" if today_list else "今天没有角色过生日哦~"
reply_message = await message.reply_text(text)
if filters.ChatType.GROUPS.filter(reply_message):
@ -140,6 +138,12 @@ class BirthdayPlugin(Plugin, BasePlugin):
}
await client.cookie_manager.request(url, method="POST", params=params, json=json)
@staticmethod
def role_to_id(name: str) -> int | None:
if name == "派蒙":
return -1
return roleToId(name)
@handler(CommandHandler, command="birthday_card", block=False)
@handler(MessageHandler, filters=filters.Regex("^领取角色生日画片$"), block=False)
@restricts()
@ -148,7 +152,7 @@ class BirthdayPlugin(Plugin, BasePlugin):
message = update.effective_message
user = update.effective_user
logger.info("用户 %s[%s] 领取生日画片命令请求", user.full_name, user.id)
today_list = self.get_today_birthday()
today_list = await self.get_today_birthday()
if not today_list:
reply_message = await message.reply_text("今天没有角色过生日哦~")
if filters.ChatType.GROUPS.filter(reply_message):
@ -162,7 +166,7 @@ class BirthdayPlugin(Plugin, BasePlugin):
else:
await fetch_hk4e_token_by_cookie(client)
for name in today_list.copy():
if role_id := roleToId(name):
if role_id := self.role_to_id(name):
try:
await self.get_card(client, role_id)
except GenshinException as e:

149
poetry.lock generated
View File

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry and should not be changed by hand.
# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand.
[[package]]
name = "aiofiles"
@ -279,60 +279,60 @@ files = [
[[package]]
name = "asyncmy"
version = "0.2.7rc6"
version = "0.2.7"
description = "A fast asyncio MySQL driver"
category = "main"
optional = false
python-versions = ">=3.7,<4.0"
files = [
{file = "asyncmy-0.2.7rc6-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:900f098e5f3ae7b28cae99e8599f5a1dd1bc74093b2ff50664202f7f5eb19c1c"},
{file = "asyncmy-0.2.7rc6-cp310-cp310-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:333483d099ef246aa18bbe502543fe891a4fb9bcbe4dc4903f2aa97889405acd"},
{file = "asyncmy-0.2.7rc6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da445ff0ba32b996fa3be86e92191b424a8ed66cf8c5572054d2b34db4199564"},
{file = "asyncmy-0.2.7rc6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:984aadf2b5fd62fe2908af79468b47c4273b4e1b10a2788ce90bd4d1c38c0129"},
{file = "asyncmy-0.2.7rc6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ccd2733b685a632c5a1056611ba3c305d88b71cd0282bf03faccc67e542d1d74"},
{file = "asyncmy-0.2.7rc6-cp310-cp310-win32.whl", hash = "sha256:5abff8281fa996650aa31d44d050e658a2befad4c346592238eae766b0233f42"},
{file = "asyncmy-0.2.7rc6-cp310-cp310-win_amd64.whl", hash = "sha256:3368344047f3b4a92fb054feb420ad85c32c13d8727ce08dc6cd4f5c01d44486"},
{file = "asyncmy-0.2.7rc6-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:f19fd29231feb681632d6e26e8ba13acb395c6d554267993a6e671becacbcda7"},
{file = "asyncmy-0.2.7rc6-cp311-cp311-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:50002daf01891ac79a1ac48890bae283724c3b6ea13b97a0ea18c5d98847e417"},
{file = "asyncmy-0.2.7rc6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:376b259098f6aab715df57798e18604a61cbd86d4392c93ba075813627b88a1a"},
{file = "asyncmy-0.2.7rc6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:888c78073985cd8b6c4da044da81efe9223350cda4d8567d98c4b3b7ae236f52"},
{file = "asyncmy-0.2.7rc6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:93069bf8e74987733c698526c3633163887efd0d7a8cb52df7183fa7348d32c1"},
{file = "asyncmy-0.2.7rc6-cp311-cp311-win32.whl", hash = "sha256:06afdb5866607a66480955000761f41973273ffb06792fbe3d767d37863981c1"},
{file = "asyncmy-0.2.7rc6-cp311-cp311-win_amd64.whl", hash = "sha256:65d1d0642a55c7b17a0d8f13acb46fb1e3509a104cdb36d3a7aad011982f9501"},
{file = "asyncmy-0.2.7rc6-cp37-cp37m-macosx_12_0_x86_64.whl", hash = "sha256:000b4a21f47fb8003da19028088519824df1ed8b86cb9fd10fbf3c6a22bf686b"},
{file = "asyncmy-0.2.7rc6-cp37-cp37m-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:8d93a78d0e0c5e249ef1f535fddca701f25724f93e8b5d3e88d6a7e2842a473d"},
{file = "asyncmy-0.2.7rc6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9486f064fd37d6eaf4f7b606e105fda2319f798da73bf22dba0841d9c4776ee"},
{file = "asyncmy-0.2.7rc6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:80c98b3f618ed220de919f740e0eb6b80f5ee74023dfdaa43fe95240caac471f"},
{file = "asyncmy-0.2.7rc6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:4cad51df9eaee07bf8493c9ecc3301204d429c40e2ec0b7a07709cb2c05604e6"},
{file = "asyncmy-0.2.7rc6-cp37-cp37m-win32.whl", hash = "sha256:fab68fa6aaea1bca3067ed5c3b4004802a04fae14d67e86c56696871c54a7351"},
{file = "asyncmy-0.2.7rc6-cp37-cp37m-win_amd64.whl", hash = "sha256:26740cbd8d28a2f0f443a1bab7aaf48693fc5ca2f8234e54b6ed9c5da993f5c7"},
{file = "asyncmy-0.2.7rc6-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:f5509f31e04c58c5397b4efa4cc2b33ca57b3f8ebe8d24041c66fd470cc08198"},
{file = "asyncmy-0.2.7rc6-cp38-cp38-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:d62f46d5a2d7f09663c564ab85645607ace492d92c5cae74c87d2013ae4f93f2"},
{file = "asyncmy-0.2.7rc6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d5ba367ac61a4d8c50dc23b6bd416f00bf2896b7cb88ad4cafbb4d7573519be"},
{file = "asyncmy-0.2.7rc6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:bf3d6dd3316e6246d836fec98d22b96ef55a2e974927c222b8e755b23ccd9f8e"},
{file = "asyncmy-0.2.7rc6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6ca7ccea23512501871982d8ed4583fc88c4de84ed2d39b650fba1a981c9589c"},
{file = "asyncmy-0.2.7rc6-cp38-cp38-win32.whl", hash = "sha256:2dbfa5f66b06b6709a6d39c09646ea56d7a6e86157604c39ddefbb4b800cf383"},
{file = "asyncmy-0.2.7rc6-cp38-cp38-win_amd64.whl", hash = "sha256:918e1284f37ab68473d817fa9a21d2278c34efd69186e733d834428abfccc44b"},
{file = "asyncmy-0.2.7rc6-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:500fddc6f1797334d4e3ff6342f26c5ad3637570d7ee10370ac07abccbee1d56"},
{file = "asyncmy-0.2.7rc6-cp39-cp39-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:444886a7ec7edcc21c69a204e38557303335df23c4be207063f4d7f77f513377"},
{file = "asyncmy-0.2.7rc6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:34ae0eed3bd322b9655e3373cc567ed8b8c2b103d178cbe1e5173023259cd417"},
{file = "asyncmy-0.2.7rc6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0778a457ad38b54e4be73a38495d6bbc0c4830ac60be97c0c74752b360d141e0"},
{file = "asyncmy-0.2.7rc6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edafb20b3b6d013d1e946367b0c0589182249cbb907644897dace07221cf86b3"},
{file = "asyncmy-0.2.7rc6-cp39-cp39-win32.whl", hash = "sha256:e30e705df00d85de3b01739eba66c75689ef88b0d092738b49bf36d43b91430e"},
{file = "asyncmy-0.2.7rc6-cp39-cp39-win_amd64.whl", hash = "sha256:182e8b9ffdf6e596758ce0d0a96e2351f20b3a59980a3fff376ed19ce2ba3bf9"},
{file = "asyncmy-0.2.7rc6-pp37-pypy37_pp73-macosx_12_0_x86_64.whl", hash = "sha256:5443bc5b44fb37a23a6708cb974bba85808425de7f738db578176650c2166df7"},
{file = "asyncmy-0.2.7rc6-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:807da0bfa269daaf5da5b850ccc69a8d2b0ed2b54cf775a2f30bf4f8507469a3"},
{file = "asyncmy-0.2.7rc6-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da3f3b9787e85925d4b0d366812ffa26665064f5fa7121971a0b4fe1aa14106b"},
{file = "asyncmy-0.2.7rc6-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:4b3a9f983e82f0c8b1aa57b4ffd36b4f6122a699ca12b512a8c37000b94bec80"},
{file = "asyncmy-0.2.7rc6-pp38-pypy38_pp73-macosx_12_0_x86_64.whl", hash = "sha256:616849cd69255f20be0f24c9e1e07db57b6d20ffee6d7dacf8722aed0578f897"},
{file = "asyncmy-0.2.7rc6-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:b786aca2f1fa814212b982c9403376747e010b886b8fd2b225412578e7787906"},
{file = "asyncmy-0.2.7rc6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl", hash = "sha256:349110abdbcf3552de9c809385f5c6048c437a6db5706c69a17a5efc299dc46d"},
{file = "asyncmy-0.2.7rc6-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:86718adfb41a54a235732eb107eb03723ff606e6dc06f11a2dc307e3154b6989"},
{file = "asyncmy-0.2.7rc6-pp39-pypy39_pp73-macosx_12_0_x86_64.whl", hash = "sha256:1bf7192ef61417ae3aa56738f985a7f929a6b95f0dd7f3112715991adc63ba45"},
{file = "asyncmy-0.2.7rc6-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:1d243fb9175387f3c4d7f7b7644c56c9e385081cf48ddc48e5694e956c247954"},
{file = "asyncmy-0.2.7rc6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9ff3b923d2cc8cf125492af209823cd1204ea04ba07443f77189d8703eb9694"},
{file = "asyncmy-0.2.7rc6-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:17f5bc77fb7797fb4658bbc19d74f5ed62d956adbb59fdd00c71673f0c48ccff"},
{file = "asyncmy-0.2.7rc6.tar.gz", hash = "sha256:3992682289a3bc154216dd3f22d915138f4d12f87667a44a082dd90e8d9f2fc4"},
{file = "asyncmy-0.2.7-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:fce60ed7f065cb857f540bfdcb9799bbde17d7d3e66640e52e009c8ad823f2c2"},
{file = "asyncmy-0.2.7-cp310-cp310-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:64ce7a0ab89bbf87a33c2ed66709f438bf1f64feb5ebe24169d8435965ac2171"},
{file = "asyncmy-0.2.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a80b5912167b0163845e62f3a9a1f9c9b269bacff01011c6e1222ca06f8af09"},
{file = "asyncmy-0.2.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:641c49117522f7fa415786181d52ef0f9a1bc477390960574c3275ecdfd894aa"},
{file = "asyncmy-0.2.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7d7697e5db6d27296d190b0c174af5b81f597bdbc76b86e782d94d2793820cbd"},
{file = "asyncmy-0.2.7-cp310-cp310-win32.whl", hash = "sha256:bab893f4e800eaaee2c0667c5ceac25873e7d801226f011cf24f52c73fb16274"},
{file = "asyncmy-0.2.7-cp310-cp310-win_amd64.whl", hash = "sha256:b664b9304fe21f5719442eafbfbb344df599ccd0956371cbc3e2eeee4938ce7c"},
{file = "asyncmy-0.2.7-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:f15281b23682aceb30f01f51b5018be41328d64dc557f10e51ba994289bbe939"},
{file = "asyncmy-0.2.7-cp311-cp311-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:15fbd1358480b38c157307dae92cd7cf6204dcd77b6456c0516da78d5f40da95"},
{file = "asyncmy-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0ce331a6b093b67d0646f7c807cfbef0b62d3166b22cab0d7c4bb7c6963ae0e"},
{file = "asyncmy-0.2.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3948ed5801aafb4449d8f1c9443e14a45103cf3d326ffcd4378b5fff532670b2"},
{file = "asyncmy-0.2.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a857d36f3a271870a1f64577ccc6e8d917737b2d2ab4dbfbecbff4208f991d69"},
{file = "asyncmy-0.2.7-cp311-cp311-win32.whl", hash = "sha256:21619f0907ce759337e8ed422983614ace1fccdf63520371171681664c60a376"},
{file = "asyncmy-0.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:80efebee605f98dfd11a3deb1e0c0e278edb1b22e65a555b0cc9a49718fe6d87"},
{file = "asyncmy-0.2.7-cp37-cp37m-macosx_12_0_x86_64.whl", hash = "sha256:f06992591a7809d67119bd202d86cb8f851f4f05b85da2e909896d4c1742f7ac"},
{file = "asyncmy-0.2.7-cp37-cp37m-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:b6db65395357b49a4a57d072f09fca4613fcaec887e8859b092217c65d49f770"},
{file = "asyncmy-0.2.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128a08661c3243d1799776c1ff1b6024fb063bdfefe1b1debc10d65887a69562"},
{file = "asyncmy-0.2.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:707c55b286d6d6d1e0e3ccbe5fbf5be24ea320d75fd61eec65cccd323d29ee8a"},
{file = "asyncmy-0.2.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:55f8290cd5e567051bbaf2c4a08563af91275f442030b8e0ad456d24c83a4011"},
{file = "asyncmy-0.2.7-cp37-cp37m-win32.whl", hash = "sha256:7a56ef1df9a4ffb984439fc211a66a508faf22eb20a013d2c15f663c7e835ff6"},
{file = "asyncmy-0.2.7-cp37-cp37m-win_amd64.whl", hash = "sha256:2bd4f8721308cf8d33b2af0edaf7df50082371925111966d639807addcf47bd3"},
{file = "asyncmy-0.2.7-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:097977b83e02d6fabdb26bfc3b574b1ee43aaf99f97f9d04214f081f7809be87"},
{file = "asyncmy-0.2.7-cp38-cp38-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:595dab7760d8cc38b93b0bd348083ea152b5ea6eac989e4a866e16c48ec3a6e5"},
{file = "asyncmy-0.2.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:772ab5f400e15ee26515b874b10ac038bb4685d30f253bef134925391be91ed6"},
{file = "asyncmy-0.2.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5042879e22bb6a9c7d52562e0cb0d4560225846f2c38da983f8cd3094f8223e1"},
{file = "asyncmy-0.2.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a2c65e3c8c9506980903639b4190f90e7dda29c4e963187fc14941d1f8ccff0"},
{file = "asyncmy-0.2.7-cp38-cp38-win32.whl", hash = "sha256:108e04113b49113b786cfe906131a72a4b453d6157cd30f0bde6beef3dae07a9"},
{file = "asyncmy-0.2.7-cp38-cp38-win_amd64.whl", hash = "sha256:5d4ecc3afd1b80e98cf0de7ef168eb97159e3ad45d6aca989befd58e9fb977e9"},
{file = "asyncmy-0.2.7-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:07285d782e2aa19a5a2b9ac13471f4d511959bee1d4bfb6cc71566de92236969"},
{file = "asyncmy-0.2.7-cp39-cp39-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:d0b8e60a43edeac8c47046b1a29c379c4d714e0ace3f0ae8c39bdef9c4bad7fb"},
{file = "asyncmy-0.2.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1324af3d552aa2833f45ae6330f98a2f243d37aa49ca3a92bde4e72f6e2603a4"},
{file = "asyncmy-0.2.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:cf96e2afe55fc3fd5e71995ccbb0047f6666416e662e1a5610095b717ce5863b"},
{file = "asyncmy-0.2.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:64882024cddf4b94538fc96c52d15dc38ffd8f464e714e49a8779e0169d923e2"},
{file = "asyncmy-0.2.7-cp39-cp39-win32.whl", hash = "sha256:13318e54acabb6759eabf2af2113398ed0de93826416c2cdbf39490c80256ae0"},
{file = "asyncmy-0.2.7-cp39-cp39-win_amd64.whl", hash = "sha256:6c885ae646f288bf3e130babb06bbe2a536975eb3bf16a340e4376bfa81e1107"},
{file = "asyncmy-0.2.7-pp37-pypy37_pp73-macosx_12_0_x86_64.whl", hash = "sha256:652c7dc1cfbd5d3a341aa9a4981435f6d87d105c8ea31e0acd817dea3447f8f3"},
{file = "asyncmy-0.2.7-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:3d5250e767192e8c3c428b1771bb4bc0f8b1d487c5c134747495c8e3ad46c32f"},
{file = "asyncmy-0.2.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a02cedca52cb4988fe2a07527351fd3d90b5a88cdd4dcc88d924fbe2dd36fee"},
{file = "asyncmy-0.2.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:ff0f1e806d01a1d41c400a161b0d43f208b04f5dd0478a888741edaa2cbd4ac1"},
{file = "asyncmy-0.2.7-pp38-pypy38_pp73-macosx_12_0_x86_64.whl", hash = "sha256:5fe7cc5914a3264a18bf9513a82ed6aa94cebde02d6cab3da992b0e4c30f1897"},
{file = "asyncmy-0.2.7-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:103b16771b253e634e59987412dfe914e0191b259c003b0b390caf3db0f8c090"},
{file = "asyncmy-0.2.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ae056f3ea4e3379491a73311fe2032b38ad46f87c5b28d43feb347eb2dc875c6"},
{file = "asyncmy-0.2.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:71b02357570f990b8b46b085f1eb6265470be7b1dab15171bc4d01c3a5d9f437"},
{file = "asyncmy-0.2.7-pp39-pypy39_pp73-macosx_12_0_x86_64.whl", hash = "sha256:69c17bfbf22ba125b76c08c79118d043b4b4076369800b7ecef09cedf15466a0"},
{file = "asyncmy-0.2.7-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl", hash = "sha256:799368f91f28fb21327bd0ca0875fa0b509d7f256476f083dc66805d26551321"},
{file = "asyncmy-0.2.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce6b36bc642be802a20c29f296590bf1cfbc9a12e7e622665fe70b5d508ed281"},
{file = "asyncmy-0.2.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:0a18d8658e5fd7568448749f3cf1e2ced5e98eeade8146106f788f8d0c059729"},
{file = "asyncmy-0.2.7.tar.gz", hash = "sha256:4a99d5242e5b9d7aee9e743ba13f6ec6465ef60bd79a91cc2ad5f286b6c51b6d"},
]
[[package]]
@ -744,7 +744,7 @@ tox = ["tox"]
[[package]]
name = "enkanetwork.py"
version = "1.4.0"
version = "1.4.1"
description = "Library for fetching JSON data from site https://enka.network/"
category = "main"
optional = false
@ -761,7 +761,7 @@ pydantic = "*"
type = "git"
url = "https://github.com/mrwan200/EnkaNetwork.py"
reference = "HEAD"
resolved_reference = "59cd9cff54deba61125171c0232c3ac22d1255b4"
resolved_reference = "c42f2dee044a6cb6a037eeda20098b524aededb7"
[[package]]
name = "et-xmlfile"
@ -792,14 +792,14 @@ test = ["pytest (>=6)"]
[[package]]
name = "fakeredis"
version = "2.9.0"
version = "2.9.2"
description = "Fake implementation of redis API for testing purposes."
category = "main"
optional = false
python-versions = ">=3.8,<4.0"
files = [
{file = "fakeredis-2.9.0-py3-none-any.whl", hash = "sha256:fc0c48216bb40a01e51b002c70966cd17242cf7406e7ced4ff85235f4971d096"},
{file = "fakeredis-2.9.0.tar.gz", hash = "sha256:ea29b10277efce23ade22ef33ccd273e365db658313ceace299e4027b066bbd6"},
{file = "fakeredis-2.9.2-py3-none-any.whl", hash = "sha256:35962e0ded572302c4461ad1a40308259cc10b7c546b13228e6d7880bf7b74bb"},
{file = "fakeredis-2.9.2.tar.gz", hash = "sha256:3bcc2b5c10d5e03cc5b46697d77c651f48391b506ff931576d2869c7549e2e25"},
]
[package.dependencies]
@ -952,7 +952,7 @@ geetest = ["rsa"]
type = "git"
url = "https://github.com/thesadru/genshin.py"
reference = "HEAD"
resolved_reference = "7f107b27422a44d0d162c41160ca470f6923cc97"
resolved_reference = "075bda5a73478f5800e7d5d3107f12c769af1406"
[[package]]
name = "gitdb"
@ -1822,14 +1822,14 @@ websockets = ">=10.0,<11.0"
[[package]]
name = "pyrogram"
version = "2.0.99"
version = "2.0.100"
description = "Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots"
category = "main"
optional = true
python-versions = "~=3.7"
files = [
{file = "Pyrogram-2.0.99-py3-none-any.whl", hash = "sha256:fc44a6d49fed5fc02c710fa83d13ecb8f5b5035dc30643360ce248d1bfdead38"},
{file = "Pyrogram-2.0.99.tar.gz", hash = "sha256:817c080d2c1b412594f7c89eacb895cb14eac4ed4b07c75fedcf80dfd92deef6"},
{file = "Pyrogram-2.0.100-py3-none-any.whl", hash = "sha256:e671ce574344dfd321a438ceed83213a129c91570e944ad1f4112607f42e1484"},
{file = "Pyrogram-2.0.100.tar.gz", hash = "sha256:2db392b06a1b38d6968d6cca70df55478c4dbb89e8980ee3b9110bb91ebe771a"},
]
[package.dependencies]
@ -1920,7 +1920,7 @@ files = [
]
[package.dependencies]
aiolimiter = {version = ">=1.0.0,<1.1.0", optional = true, markers = "extra == \"ext\""}
aiolimiter = {version = ">=1.0.0,<1.1.0", optional = true, markers = "extra == \"ext\" or extra == \"rate-limiter\""}
APScheduler = {version = ">=3.10.0,<3.11.0", optional = true, markers = "extra == \"ext\""}
cachetools = {version = ">=5.3.0,<5.4.0", optional = true, markers = "extra == \"ext\""}
httpx = {version = ">=0.23.3,<0.24.0", extras = ["http2"]}
@ -2098,14 +2098,14 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"]
[[package]]
name = "sentry-sdk"
version = "1.15.0"
version = "1.16.0"
description = "Python client for Sentry (https://sentry.io)"
category = "main"
optional = false
python-versions = "*"
files = [
{file = "sentry-sdk-1.15.0.tar.gz", hash = "sha256:69ecbb2e1ff4db02a06c4f20f6f69cb5dfe3ebfbc06d023e40d77cf78e9c37e7"},
{file = "sentry_sdk-1.15.0-py2.py3-none-any.whl", hash = "sha256:7ad4d37dd093f4a7cb5ad804c6efe9e8fab8873f7ffc06042dc3f3fd700a93ec"},
{file = "sentry-sdk-1.16.0.tar.gz", hash = "sha256:a900845bd78c263d49695d48ce78a4bce1030bbd917e0b6cc021fc000c901113"},
{file = "sentry_sdk-1.16.0-py2.py3-none-any.whl", hash = "sha256:633edefead34d976ff22e7edc367cdf57768e24bc714615ccae746d9d91795ae"},
]
[package.dependencies]
@ -2114,6 +2114,7 @@ urllib3 = {version = ">=1.26.11", markers = "python_version >= \"3.6\""}
[package.extras]
aiohttp = ["aiohttp (>=3.5)"]
arq = ["arq (>=0.23)"]
beam = ["apache-beam (>=2.12)"]
bottle = ["bottle (>=0.12.13)"]
celery = ["celery (>=3)"]
@ -2138,14 +2139,14 @@ tornado = ["tornado (>=5)"]
[[package]]
name = "setuptools"
version = "67.3.2"
version = "67.4.0"
description = "Easily download, build, install, upgrade, and uninstall Python packages"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
{file = "setuptools-67.3.2-py3-none-any.whl", hash = "sha256:bb6d8e508de562768f2027902929f8523932fcd1fb784e6d573d2cafac995a48"},
{file = "setuptools-67.3.2.tar.gz", hash = "sha256:95f00380ef2ffa41d9bba85d95b27689d923c93dfbafed4aecd7cf988a25e012"},
{file = "setuptools-67.4.0-py3-none-any.whl", hash = "sha256:f106dee1b506dee5102cc3f3e9e68137bbad6d47b616be7991714b0c62204251"},
{file = "setuptools-67.4.0.tar.gz", hash = "sha256:e5fd0a713141a4a105412233c63dc4e17ba0090c8e8334594ac790ec97792330"},
]
[package.extras]
@ -2265,7 +2266,7 @@ files = [
]
[package.dependencies]
greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"}
greenlet = {version = "!=0.4.17", markers = "python_version >= \"3\" and platform_machine == \"aarch64\" or python_version >= \"3\" and platform_machine == \"ppc64le\" or python_version >= \"3\" and platform_machine == \"x86_64\" or python_version >= \"3\" and platform_machine == \"amd64\" or python_version >= \"3\" and platform_machine == \"AMD64\" or python_version >= \"3\" and platform_machine == \"win32\" or python_version >= \"3\" and platform_machine == \"WIN32\""}
[package.extras]
aiomysql = ["aiomysql", "greenlet (!=0.4.17)"]
@ -2882,26 +2883,26 @@ multidict = ">=4.0"
[[package]]
name = "zipp"
version = "3.14.0"
version = "3.15.0"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
{file = "zipp-3.14.0-py3-none-any.whl", hash = "sha256:188834565033387710d046e3fe96acfc9b5e86cbca7f39ff69cf21a4128198b7"},
{file = "zipp-3.14.0.tar.gz", hash = "sha256:9e5421e176ef5ab4c0ad896624e87a7b2f07aca746c9b2aa305952800cb8eecb"},
{file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"},
{file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"},
]
[package.extras]
docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]
testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
[extras]
all = ["pytest", "pytest-asyncio", "flaky", "Pyrogram", "TgCrypto"]
all = ["Pyrogram", "TgCrypto", "flaky", "pytest", "pytest-asyncio"]
pyro = ["Pyrogram", "TgCrypto"]
test = ["pytest", "pytest-asyncio", "flaky"]
test = ["flaky", "pytest", "pytest-asyncio"]
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
content-hash = "2be49a675775fb01971640b7bc9dfd22a457a05d0fbb5b3d129100b774499f8e"
content-hash = "e9f15ac1654043ac2da2e8e5b1bf3def4ec4da717a29a4a7ace9a9bb2350816c"

View File

@ -18,7 +18,7 @@ colorlog = "^6.7.0"
playwright = "^1.27.1"
fakeredis = "^2.9.0"
beautifulsoup4 = "^4.11.2"
asyncmy = "0.2.7rc6"
asyncmy = "^0.2.7"
pyppeteer = "^1.0.2"
aiofiles = "^23.1.0"
python-dotenv = "^0.21.1"

View File

@ -9,7 +9,7 @@ apscheduler==3.10.0 ; python_version >= "3.8" and python_version < "4.0"
arko-wrapper==0.2.7 ; python_version >= "3.8" and python_version < "4.0"
async-lru==1.0.3 ; python_version >= "3.8" and python_version < "4.0"
async-timeout==4.0.2 ; python_version >= "3.8" and python_version < "4.0"
asyncmy==0.2.7rc6 ; python_version >= "3.8" and python_version < "4.0"
asyncmy==0.2.7 ; python_version >= "3.8" and python_version < "4.0"
attrs==22.2.0 ; python_version >= "3.8" and python_version < "4.0"
backports-zoneinfo==0.2.1 ; python_version >= "3.8" and python_version < "3.9"
beautifulsoup4==4.11.2 ; python_version >= "3.8" and python_version < "4.0"
@ -22,14 +22,14 @@ click==8.1.3 ; python_version >= "3.8" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32" or python_version >= "3.8" and python_version < "4.0" and platform_system == "Windows"
colorlog==6.7.0 ; python_version >= "3.8" and python_version < "4.0"
cryptography==39.0.1 ; python_version >= "3.8" and python_version < "4.0"
enkanetwork-py @ git+https://github.com/mrwan200/EnkaNetwork.py@HEAD ; python_version >= "3.8" and python_version < "4.0"
enkanetwork-py @ git+https://github.com/mrwan200/EnkaNetwork.py@master ; python_version >= "3.8" and python_version < "4.0"
et-xmlfile==1.1.0 ; python_version >= "3.8" and python_version < "4.0"
exceptiongroup==1.1.0 ; python_version >= "3.8" and python_version < "3.11"
fakeredis==2.9.0 ; python_version >= "3.8" and python_version < "4.0"
fakeredis==2.9.2 ; python_version >= "3.8" and python_version < "4.0"
fastapi==0.91.0 ; python_version >= "3.8" and python_version < "4.0"
flaky==3.7.0 ; python_version >= "3.8" and python_version < "4.0"
frozenlist==1.3.3 ; python_version >= "3.8" and python_version < "4.0"
genshin @ git+https://github.com/thesadru/genshin.py@HEAD ; python_version >= "3.8" and python_version < "4.0"
genshin @ git+https://github.com/thesadru/genshin.py@master ; python_version >= "3.8" and python_version < "4.0"
gitdb==4.0.10 ; python_version >= "3.8" and python_version < "4.0"
gitpython==3.1.31 ; python_version >= "3.8" and python_version < "4.0"
greenlet==1.1.3 ; python_version >= "3.8" and python_version < "4.0"
@ -48,7 +48,7 @@ iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
jinja2==3.1.2 ; python_version >= "3.8" and python_version < "4.0"
lxml==4.9.2 ; python_version >= "3.8" and python_version < "4.0"
mako==1.2.4 ; python_version >= "3.8" and python_version < "4.0"
markdown-it-py==2.1.0 ; python_version >= "3.8" and python_version < "4.0"
markdown-it-py==2.2.0 ; python_version >= "3.8" and python_version < "4.0"
markupsafe==2.1.2 ; python_version >= "3.8" and python_version < "4.0"
mdurl==0.1.2 ; python_version >= "3.8" and python_version < "4.0"
multidict==6.0.4 ; python_version >= "3.8" and python_version < "4.0"
@ -66,7 +66,7 @@ pyee==8.1.0 ; python_version >= "3.8" and python_version < "4.0"
pygments==2.14.0 ; python_version >= "3.8" and python_version < "4.0"
pypng==0.20220715.0 ; python_version >= "3.8" and python_version < "4.0"
pyppeteer==1.0.2 ; python_version >= "3.8" and python_version < "4.0"
pyrogram==2.0.99 ; python_version >= "3.8" and python_version < "4.0"
pyrogram==2.0.100 ; python_version >= "3.8" and python_version < "4.0"
pysocks==1.7.1 ; python_version >= "3.8" and python_version < "4.0"
pytest-asyncio==0.20.3 ; python_version >= "3.8" and python_version < "4.0"
pytest==7.2.1 ; python_version >= "3.8" and python_version < "4.0"
@ -79,8 +79,8 @@ qrcode==7.4.2 ; python_version >= "3.8" and python_version < "4.0"
redis==4.5.1 ; python_version >= "3.8" and python_version < "4.0"
rfc3986[idna2008]==1.5.0 ; python_version >= "3.8" and python_version < "4.0"
rich==13.3.1 ; python_version >= "3.8" and python_version < "4.0"
sentry-sdk==1.15.0 ; python_version >= "3.8" and python_version < "4.0"
setuptools==67.3.2 ; python_version >= "3.8" and python_version < "4.0"
sentry-sdk==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
setuptools==67.4.0 ; python_version >= "3.8" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
smmap==5.0.0 ; python_version >= "3.8" and python_version < "4.0"
sniffio==1.3.0 ; python_version >= "3.8" and python_version < "4.0"
@ -105,4 +105,4 @@ uvloop==0.17.0 ; sys_platform != "win32" and sys_platform != "cygwin" and platfo
watchfiles==0.18.1 ; python_version >= "3.8" and python_version < "4.0"
websockets==10.4 ; python_version >= "3.8" and python_version < "4.0"
yarl==1.8.2 ; python_version >= "3.8" and python_version < "4.0"
zipp==3.14.0 ; python_version >= "3.8" and python_version < "4.0"
zipp==3.15.0 ; python_version >= "3.8" and python_version < "4.0"