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

如果 Song 傳入的是網址的列表,那他會有一個 Song.Songs 的屬性,是 Song 的 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}")

download 是 download(path : str, stype : str = "audio") 要下載影片就將 stype 換成 video

這樣就能下載這首歌

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.5.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

NPytdl-0.3.5-py3-none-any.whl (5.0 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