Skip to main content

A library that helps downloading videos from bitchute.com

Project description

pychute

A library that helps download videos from BitChute website

GitHub Downloads (all assets, all releases) GitHub commit activity GitHub License GitHub Tag GitHub Release

Installation:

pip install pychute

How to use:

from pychute import PyChute

url = "bitchute url"

pc = PyChute(url=url)
pc.download()

Additional features:

Progress callback

If you need to get progress like percentage or download speed, you can create a function and pass as a parameter in the download method.

import time
from pychute import PyChute

start_time = time.time()

def show_progress(count, block_size, total_size):
    
    # progress percentage
    progress = min(1.0, float(count * block_size) / total_size)
    print("Progress:", progress)

    # download speed
    elapsed_time = time.time() - start_time
    if elapsed_time > 0:
        speed = (count * block_size) / (1024 * elapsed_time)  # speed in KB/s
        print(f'Download speed: {speed:.2f} KB/s')


url = "bitchute url"

pc = PyChute(url=url)
pc.download(on_progress_callback=show_progress)

Filename

You can pass filename as a parameter in the form of a string to specify download location. Using download method without the filename parameter will save the file to where your script is located.

from pychute import PyChute

url = "bitchute url"

pc = PyChute(url=url)
output_path = f"D:\\Downloads/{pc.title()}"

pc.download()

Other data

Apart from downloading, you can access other data about BitChute video:

from pychute import PyChute

url = "bitchute url"

pc = PyChute(url=url)
output_path = f"D:\\Downloads/{pc.title()}"

# video title
print(pc.title())

# channel name
print(pc.channel())

# video publish date
print(pc.publish_date())

# video duration
print(pc.length())

# subscriptions number
print(pc.subscriptions())

# video likes
print(pc.likes())

# video views
print(pc.views())

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

pychute-0.0.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

pychute-0.0.1-py3-none-any.whl (5.7 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