niconico_dl
ニコニコ動画にある動画をダウンロードするためのPython用のライブラリです。
警告!
このniconico_dlは開発が停止して、アップデートもこれからありません。
代わりにこちらを使用してください。
リファレンス:https://tasuren.github.io/niconico_dl/
Github:https://github.com/tasuren/niconico_dl/
Install
pip install niconico_dl
Examples
Normal
url = "https://www.nicovideo.jp/watch/sm38533566"
with niconico_dl.NicoNicoVideo(url, log=True) as nico:
data = nico.get_info()
nico.download(data["video"]["title"] + ".mp4")
print("Downloaded!")
Async
async def start_async():
url = "https://www.nicovideo.jp/watch/sm9664372"
async with niconico_dl.NicoNicoVideoAsync(url, log=True) as nico:
data = await nico.get_info()
await nico.download(data["video"]["title"] + ".mp4")
print("Downloaded!")
asyncio.run(start_async())
Command Line
使用方法:niconico_dl [URL]
ダウンロードした動画はoutput.mp4という名前で実行したディレクトリに保存されます。
Notes
もしDiscordのボイスチャットにニコニコ動画を流したい人はNicoNicoVideoAsync.downloadではなくNicoNicoVideoAsync.get_download_linkを使用して取得したダウンロードリンクで流すことを推奨します。
downloadは動画をダウンロードするため時間がかかります。
なのでget_download_linkでダウンロードリンクを取得してそれを使い直接流すのを推奨します。
注意:closeをお忘れなく、詳細はリファレンスを見てください。
Metadata
Release files for niconico-dl 2.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| niconico_dl-2.2.8.tar.gz | 10.8 kB | Without provenance | Details for niconico_dl-2.2.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| niconico_dl-2.2.8-py3-none-any.whl | Python 3 | none | any | Details for niconico_dl-2.2.8-py3-none-any.whl |
Total release size: 24.5 kB
Release files / niconico_dl-2.2.8.tar.gz
| Download URL | niconico_dl-2.2.8.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15845bae0d8baecce68ca8a0c2b3afcd16f27b39f9d791415f721858b35e6c9d
|
|
BLAKE2b-256 checksum How to use checksums |
302e8874184b21984eb01b162b26ee99cbce86df2e18d3e8b7b67b3e71e0d9fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Release files / niconico_dl-2.2.8-py3-none-any.whl
| Download URL | niconico_dl-2.2.8-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80540fdea548ab7d67cc54b39487de27e6b0e5330564a6c5d4f770bd54e43b3f
|
|
BLAKE2b-256 checksum How to use checksums |
a87ec789e085927ddb2ac77da6d0a72ce574b5bb7f85a05b8050427b23fe7720
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Security for niconico-dl 2.2.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.