Skip to main content

a new youtube_dl

Project description

Pytdl Python的YTDL!


目前簡化為四種功能~~

方法 傳回參數
songList(query : str, size : int = 12) List[dict]
searchList(list_id : str) List[str]
songs(querys : List[str]) List[songList]
info(url : str) Song or SongList

songList 回傳的結構為

[{
	"id": str,
	"title": str,
	"thumbnail": list,
	"length": str
}, ...]

searchList 回傳的結構為

[str, ...]

songs 回傳的結構為

[songList(), ...]

info 回傳的結構為

[Song() | SongList(), ...]

Song 與 SongList 要使用 create 創建其結構 (async func)

SongList 創建後的 SongList.songs 為一個 list

from NPytdl import Pytdl
ydl = Pytdl()

song = ydl.info("https://youtu.be/RGtSdbjxVKU")

import asyncio
asyncio.run(song.create())

song.download(f"./test/{song.title}")

這樣就能下載這首歌

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

NPytdl-0.3.4.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

NPytdl-0.3.4-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

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