Skip to main content

pyxunlei

基于Docker版本的Xunlei API Client

支持版本

仅在3.7.1版本中测试通过

使用方法

可以使用pip安装 pip install pyxunlei -i https://pypi.python.org/simple

from pyxunlei import XunleiClient
#  初始化时支持以下参数:
#  host (str): 域名或IP
#  port (int): 端口号
#  ssl (bool): 是否启动HTTPS
#  device_name (str): 设备名称,当同一个账号下绑定了多个远程迅雷,可指定设备名称,设备名称可在迅雷APP查看
#      例如:群晖-xunlei
#      device_name为空时使用第一个设备.
#  download_root_dir(str): 下载根目录的目录名称,可以在web页面上查看,如不填写则默认选择第一个(一般是迅雷下载)
xunlei_client = XunLeiClient(
        '192.168.2.137', 2345, device_name="群晖-xunlei")

# 获取已完成任务列表
completed_tasks = xunlei_client.completed_tasks()

# 获取未完成任务列表
uncompleted_tasks = xunlei_client.uncompleted_tasks()

# 提交磁力链接
magnetic_link = "磁力链接"
sub_dir = "子目录"  # 为空时则不创建子目录
preprocess_file = xunlei_client.filter_file_by_size  # 指定预处理文件函数,可使用内置的filter_file_by_size过滤掉小于500M以及大于40G的文件
xunlei_client.download_magnetic(magnetic_link, sub_dir, preprocess_file)

# 提交种子链接
torrent_file_path = "your.torrent"  # 种子文件路径
xunlei_client.download_torrent(torrent_file_path, sub_dir, preprocess_file)

Metadata

Release files for pyxunlei 0.1.8

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

Source distribution (sdist)

Source distribution for pyxunlei 0.1.8
File Size Uploaded Provenance Actions
pyxunlei-0.1.8.tar.gz 7.4 kB Without provenance Details for pyxunlei-0.1.8.tar.gz

Built distribution (wheel)

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

Total release size: 15.7 kB

Release files / pyxunlei-0.1.8.tar.gz

Download URL pyxunlei-0.1.8.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
712c3da34ab319ae96f7bd33949e091f0e897525b9c96cd2d1b71d00a82d2374
BLAKE2b-256 checksum
How to use checksums
c7fe601cd6ebc40006ac4e959541b6d939387449d4f4c2cef08dfd0d63e3c50d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.10.6 Darwin/20.6.0

Release files / pyxunlei-0.1.8-py3-none-any.whl

Download URL pyxunlei-0.1.8-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fb35c702ac81b8ab90f79aecc4f6b7b8995c111ff424caadf7105398a606c23
BLAKE2b-256 checksum
How to use checksums
0413f8d767cdff518fe5bb000b03b6171e51376c255d0b79363780eaac0e852c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.10.6 Darwin/20.6.0

Security for pyxunlei 0.1.8

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.

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