Skip to main content

Pikax:unicorn:

GitHub stars PyPI PyPI - License GitHub code size in bytes GitHub last commit PyPI - Downloads
Pikax的目的是提供一个使用简单且强大的Pixiv[P站]批量下载工具。

English ver

接口版

为了宣扬民族核心价值观,本接口仅提供单核多线程下载

  pip install pikax

需要

目前支持的下载功能

  • 搜索
    • 关键字/标签,数量,类别,模式,受欢迎程度
  • 排行榜
    • 日期,数量,模式,内容种类
  • 你的或者别人的
    • 插画,漫画,收藏

在计划中的功能

  • 。。。
  • 告诉我呀!

试用 demo.py

下载当日排行榜前50的插画

  from pikax import Pikax

  pixiv = Pikax()
  results = pixiv.rank(limit=50)
  pixiv.download(results)

搜索并下载arknights相关,赞数约1000的50张插画

  from pikax import Pikax, settings, params

  pixiv = Pikax(settings.username, settings.password)
  results = pixiv.search(keyword='arknights', limit=50, popularity=1000, match=params.Match.PARTIAL)
  pixiv.download(results)

下载用户的作品 (需要登录,settings.py有临时的账号)

  from pikax import Pikax, settings, params

  # 自己的
  pixiv = Pikax()
  user = pixiv.login(username=settings.username, password=settings.password)  # 登录
  bookmarks = user.bookmarks(limit=20)  # 获取收藏
  pixiv.download(bookmarks)  # 下载

  # 任何用户
  pixiv = Pikax(settings.username, settings.password)
  other_user = pixiv.visits(user_id=201323)  # 输入id得到用户

  illusts = other_user.illusts(limit=25)  # 获取他的画作
  pixiv.download(illusts)  # 下载

  mangas = other_user.mangas(limit=10)  # 获取他的漫画
  pixiv.download(mangas)  # 下载

  bookmarks = other_user.bookmarks(limit=20)  # 获取他的收藏
  pixiv.download(bookmarks)  # 下载

用作品id下载

  from pikax import Pikax

  pixiv = Pikax()
  pixiv.download(illust_id=75608670)

更改语言

  from pikax.texts import texts

  texts.lang = texts.ZH  # 换到中文
  # texts.lang = texts.EN  # 默认

更多例子请参考demo.py

更详细的接口详情请参考models.py

更多操作

下载排行榜前50且收藏高于1000的作品

  from pikax import Pikax

  pixiv = Pikax()
  results = pixiv.rank(limit=50)  # 排行榜前50

  new_results = results.bookmarks > 1000  # 去除收藏小于 1000
  pixiv.download(new_results)  # 下载

搜索'初音'相关的200个收藏约1000的作品并筛选出其中赞大于1000且浏览量大于20000的作品

  from pikax import Pikax, settings

  pixiv = Pikax(settings.username, settings.password)
  results = pixiv.search(keyword='初音', limit=200, popularity=1000)  # 搜索

  new_results = (results.bookmarks > 1000).views > 20000  # 获取 赞 > 1000 和 浏览 > 20000 的作品
  pixiv.download(new_results)  # 下载

进阶操作请参考advanced demo.py

个性化设置请前往settings.py

图形界面版

不提供翻墙,请使用VPN或者飞机

  • 日志
  • 用P站账号或游客登录即可
  • 支持多核下载
    • 排行榜
    • 搜索
    • 特定用户所有的插画、收藏、漫画
    • 任意URL的插画、漫画
  • 语言支持
    • 英文 (默认)
    • 中文
  • 下载

从源码创建执行文件

依赖 pyinstaller
pip install pyinstaller

非windows

git clone https://github.com/Redcxx/Pikax.git
cd Pikax/gui
# 按需求修改 main.spec
pyinstaller main.spec
cd dist
ls

Windows

git clone https://github.com/Redcxx/Pikax.git
cd Pikax/gui
# 按需求修改 main.spec
./build.bat
cd build/dist
ls

联系我可发邮件到这里

Metadata

Release files for pikax 2.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pikax 2.2.7
File Size Uploaded Provenance Actions
pikax-2.2.7.tar.gz 35.4 kB Without provenance Details for pikax-2.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pikax 2.2.7
File Interpreter ABI Platform Actions
pikax-2.2.7-py3-none-any.whl Python 3 none any Details for pikax-2.2.7-py3-none-any.whl

Total release size: 77.2 kB

Release files / pikax-2.2.7.tar.gz

Download URL pikax-2.2.7.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e2a1cc97ab6a48415435d3c9f2f7310b10084a5340022e1f67237da3d209b08f
BLAKE2b-256 checksum
How to use checksums
c856f301293f91e74284bb74f12473723168e9e8afec186cf2399e3d1c68830b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

Release files / pikax-2.2.7-py3-none-any.whl

Download URL pikax-2.2.7-py3-none-any.whl
Size 41.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db5baa69152edcaed0748eae09067f3851967d30353a489a0285721a4288e917
BLAKE2b-256 checksum
How to use checksums
0c871abf8fbd6101654073e3b018208f112605f656f7992de892999ad5a66bde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

Security for pikax 2.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.2.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page