一个 ygo 工具集 | Handy tools for ygo
Project description
ygoutil
一个 ygo 工具集
安装
pip install ygoutil
使用
卡片源
通过 ygoutil.source
中的类来获取 Card
对象
- 百鸽 API
BaiGe
- 百鸽网页
BaiGePage
- OurOcg 网页
OurOcg
- 卡片数据库
CDB
一个简单的例子如下:
从百鸽获取卡片
from ygoutil.source import BaiGe
source = BaiGe()
card = await source.from_query("解码语者")
cards = await source.list_from_query("解码语者")
print(source.current_query.total)
print(card)
print(card.id, card.name, card.types, card.text)
print(card.monster.attack, card.monster.link.marks)
其它卡片源接口近似,不同源获取到的卡片数据有细节上的区别
目前勉强能跑( 更多用法请参考测试逻辑或直接询问开发者
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ygoutil-0.2.2.tar.gz
(32.4 kB
view hashes)
Built Distribution
ygoutil-0.2.2-py3-none-any.whl
(37.5 kB
view hashes)