ニコニコ動画ダウンローダー NicoNico Video Downloader
Project description
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
をお忘れなく、詳細はリファレンスを見てください。
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
niconico_dl-2.2.8.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for niconico_dl-2.2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80540fdea548ab7d67cc54b39487de27e6b0e5330564a6c5d4f770bd54e43b3f |
|
MD5 | 40303f157bd7c062218bcd5f9e93c9a2 |
|
BLAKE2b-256 | a87ec789e085927ddb2ac77da6d0a72ce574b5bb7f85a05b8050427b23fe7720 |