Skip to main content

Utilities and scrapers toolkit

Project description

loki

一个可被其它项目复用的工具库(同时包含部分 scraper)。

作为依赖安装

本地源码引用(推荐开发阶段)

pip install -e .

启用 scraper 相关依赖

pip install -e ".[scrapers]"

Playwright 还需要安装浏览器(首次一次性):

python -m playwright install chromium

在其它项目里引用

from loki.scrapers import RequestMixin, Method
from loki.scrapers.javdb import JavDB

发布 / 构建

python scripts/release.py --dry-run     # 清理 dist/build、跑测试、build、twine check,不上传
python scripts/release.py               # 上传到 PyPI,上传前会确认
python scripts/release.py --yes         # CI/确认无误时直接上传

脚本会自动删除旧的 dist/build/*.egg-info,并在上传前检查当前版本是否已经存在于 PyPI;如果已存在,需要先提升 pyproject.toml 里的 version

只想本地安装刚构建的 wheel 时,可先执行 dry-run,再安装:

pip install dist/loki_cactus01-*.whl

说明

  • 依赖在 pyproject.toml[project.dependencies] / [project.optional-dependencies] 中维护。
  • 命令行入口 loki 指向 loki.__main__:main(目前仅做日志初始化)。

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

loki_cactus01-1.8.14.tar.gz (485.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loki_cactus01-1.8.14-py3-none-any.whl (485.7 kB view details)

Uploaded Python 3

File details

Details for the file loki_cactus01-1.8.14.tar.gz.

File metadata

  • Download URL: loki_cactus01-1.8.14.tar.gz
  • Upload date:
  • Size: 485.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for loki_cactus01-1.8.14.tar.gz
Algorithm Hash digest
SHA256 9813e8145d8a0672ea1894f7f6a5e20ad9ff29fe78c0b9f38c24af2d3fb81fdc
MD5 21d931652e22c0cfebf8894a42df7969
BLAKE2b-256 8cdffc3c617515fc4eeed2bcb6f52af7ec400247ae9250abdbb1ff0d34695444

See more details on using hashes here.

File details

Details for the file loki_cactus01-1.8.14-py3-none-any.whl.

File metadata

  • Download URL: loki_cactus01-1.8.14-py3-none-any.whl
  • Upload date:
  • Size: 485.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for loki_cactus01-1.8.14-py3-none-any.whl
Algorithm Hash digest
SHA256 49391923f7e76f5f8b6c30b34e0b17ccd10e9964d83cfb4a5aad33c7a6efa324
MD5 3487ae1302b7f40f6691d4a0f3fec07d
BLAKE2b-256 997b25c7426a2f3e173cc4910aec3d8a3328a5d69697ec03656bb4aa348beccb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page