acfunsdk - UNOFFICEICAL
Project description
acfunsdk - UNOFFICEICAL
acfunsdk是 非官方的 AcFun弹幕视频网 Python库。
声明:
acfunsdk
是python的学习工具,并未破解任何acfun相关内容。代码完全公开,仅用于交流学习。 如涉及版权等相关问题,请遵守acfun相关协议及法律法规。如有bug或其他疑问,欢迎发布issues。
Python : Python>=3.8
, 本体请自行下载安装。
从PyPI安装
python -m pip install acfunsdk
使用方法
实例化获取对象
from acfunsdk import Acer
# 实例化一个Acer
acer = Acer()
# 登录用户(成功登录后会自动保存 '<用户名>.cookies')
# 请注意保存,防止被盗
acer.login(username='you@email.com', password='balalabalala')
# 读取用户(读取成功登录后保存的 '<用户名>.cookies')
acer.loading(username='13800138000')
# 每日签到,领香蕉🍌
acer.signin()
# 通过链接直接获取内容对象
# 目前支持 9种内容类型:
# 视 频: https://www.acfun.cn/v/ac4741185
demo_video = acer.get("https://www.acfun.cn/v/ac4741185")
print(demo_video)
# 文 章: https://www.acfun.cn/a/ac16695813
demo_article = acer.get("https://www.acfun.cn/a/ac16695813")
print(demo_article)
# 合 集: https://www.acfun.cn/a/aa6001205
demo_album = acer.get("https://www.acfun.cn/a/aa6001205")
print(demo_album)
# 番 剧: https://www.acfun.cn/bangumi/aa5023295
demo_bangumi = acer.get("https://www.acfun.cn/bangumi/aa5023295")
print(demo_bangumi)
# 个人页: https://www.acfun.cn/u/39088
demo_up = acer.get("https://www.acfun.cn/u/39088")
print(demo_up)
# 动 态: https://www.acfun.cn/moment/am2797962
demo_moment = acer.get("https://www.acfun.cn/moment/am2797962")
print(demo_moment)
# 直 播: https://live.acfun.cn/live/378269
demo_live = acer.get("https://live.acfun.cn/live/378269")
print(demo_live)
# 分 享: https://m.acfun.cn/v/?ac=37086357
demo_share = acer.get("https://m.acfun.cn/v/?ac=37086357")
print(demo_share)
# 涂鸦(单页): https://hd.acfun.cn/doodle/knNWmnco.html
demo_doodle = acer.get("https://hd.acfun.cn/doodle/knNWmnco.html")
print(demo_doodle)
参考 & 鸣谢
- AcFun 助手 是一个适用于 AcFun( acfun.cn ) 的浏览器插件。
- AcFunDanmaku 是用C# 和 .Net 6编写的AcFun直播弹幕工具。
- 实现自己的AcFun直播弹幕姬 @財布士醬
- QQ频道“AcFun开源⑨课”
- 使用 Poetry 构建
About Me
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
acfunsdk-0.9.7.tar.gz
(53.3 kB
view details)
Built Distribution
acfunsdk-0.9.7-py3-none-any.whl
(64.2 kB
view details)
File details
Details for the file acfunsdk-0.9.7.tar.gz
.
File metadata
- Download URL: acfunsdk-0.9.7.tar.gz
- Upload date:
- Size: 53.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87896ca71eee1c02a054e44248bb97201963f35509f4cefc9fb43b05e890d8b8 |
|
MD5 | 86f7b860d64e605503d940c2c1df91ab |
|
BLAKE2b-256 | 9809c1c650e75b27940547e7858a9042f6d1569dadc7e14bfa5be92ae02a3c6e |
File details
Details for the file acfunsdk-0.9.7-py3-none-any.whl
.
File metadata
- Download URL: acfunsdk-0.9.7-py3-none-any.whl
- Upload date:
- Size: 64.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.9.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b30ef3e1e1d42f695a06251dd62e39c32550e67c461465a4e488805edd960f5 |
|
MD5 | 8bcf775affb813ecbb06bf278ec2d608 |
|
BLAKE2b-256 | e66ece826ce5f0cf42b79ff8083a2dd62bdc7279ee8860351068a0b684ced6e1 |