Download youtube videos
Project description
youtubi
Download youtube videos python library .
Install :
pip install youtubi
Example :
Download list of videos urls
from youtubi import process
urls= """
https://youtu.be/oaxWxSdytTk?si=DNJOpBMtJyrmaMQR
https://youtu.be/Ljmv9joEXiM?si=I55FFgGCgsZ3Km8w
https://youtu.be/NpETkRzAINM?si=MpHEnTkDsuNE8J5K
https://youtu.be/dsHGy672Occ?si=6GsanDFDafBQ1eaM
https://youtu.be/qB6K8K4AFWI?si=pilsPHBmP1S4bFFF
https://youtu.be/T5onNs-D4WA?si=bFmKrgiWa1nzbaiQ
https://youtu.be/hM1Bk4cEFmg?si=WQlRpNPg6b-67Agd
https://youtu.be/DPGR_LyDKNE?si=8Yaeww2zxaQ3xSv3
https://youtu.be/D5hU4ICEB3o?si=HHTbWCo6knD6n5Xp
"""
process(urls)
# process(text, output_path = "./videos")
Download list of videos of channel
copy outter html of page where plylist is shown in the page , then
from youtubi import process , get_channel
html_text = "....."
urls = get_channel(html_text)
process(urls)
# process(html_text, output_path = "./videos")
Download list of videos urls for videos page html
from youtubi import process , get_channel , get_videos
html_text = open("file.html").read()
vidoes_dict = get_videos(html_text)
print(f"Found {len(vidoes_dict)} videos ")
urls = list()
for k , v in vidoes_dict.items() :
if "Tutorial" in k :
urls.append(v)
print("Fitred urls = " , len(urls))
urls = "\n".join(urls)
process(urls, output_path = "./videos")
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
youtubi-1.0.9.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file youtubi-1.0.9.tar.gz
.
File metadata
- Download URL: youtubi-1.0.9.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a5130a22f15128df9dea0b6fa24f8bbd7711f4458b6e7c9b008b94fad340053 |
|
MD5 | da4c96a5a8b51ad05aadd9ff9692dcba |
|
BLAKE2b-256 | 2e9eec46b74e7985b9a8c66ef95ed2e1cc3dae5179d7a9764d5db07c755d0ce6 |
File details
Details for the file youtubi-1.0.9-py3-none-any.whl
.
File metadata
- Download URL: youtubi-1.0.9-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a34f1b31613428c67a46ed3b012317bd04f8b2a986e6094f744fe09d509e89dc |
|
MD5 | be01407cae96874784fe147ea4d4391b |
|
BLAKE2b-256 | bf38c178dc6f186bfd2e252dbb9de7706bbb973dd8504598c24cddfa5f0c6d12 |