Skip to main content

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


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.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

youtubi-1.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file youtubi-1.1.0.tar.gz.

File metadata

  • Download URL: youtubi-1.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for youtubi-1.1.0.tar.gz
Algorithm Hash digest
SHA256 138630294fb53a907ada36dc3f3fe67c80e38c025bfc949b3ac3d2bdaca484a3
MD5 d0e6c6cb83d588cff0c6d9f377c5ae35
BLAKE2b-256 7d6f60570901a4d6154bc8dd8d23a3183d59c9a55269ff3cb4cd2d6b110779ee

See more details on using hashes here.

File details

Details for the file youtubi-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: youtubi-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for youtubi-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bab316c3397de21a3aefe7d36e8ced5b57630aac2903b0de1a4f926742d6e953
MD5 fac0a8337a712f52205ea272036ae2fa
BLAKE2b-256 ee8e9c48badd2ec4bc695a5759545f106489620bdef14bf2ba29a9f576758052

See more details on using hashes here.

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