Skip to main content

A package for generating transcripts from YouTube videos in various formats

Project description

PyPI version License: MIT Downloads LinkedIn

Tube Scriptor

tube_scriptor is a Python package designed to fetch and generate transcripts from YouTube videos in various formats including XML, JSON, Python lists, or plain text. It simplifies the process of obtaining video transcripts, making it accessible for data analysis, content generation, and accessibility features.

Installation

To install tube_scriptor, you can use pip:

pip install tube_scriptor

Usage

Using tube_scriptor is straightforward. Below are examples demonstrating how to fetch a video transcript in various formats and using both a YouTube URL and a direct video ID.

Fetching Transcript as a List

from tube_scriptor import fetch_transcript

# Using a YouTube URL
youtube_url = "https://www.youtube.com/watch?v=exampleVideoId"
transcript_list = fetch_transcript(youtube_url, 'list')
print(transcript_list)

# Using a YouTube video ID
youtube_id = "exampleVideoId"
transcript_list = fetch_transcript(youtube_id, 'list')
print(transcript_list)

Fetching Transcript as a JSON String

# Using a YouTube video ID
youtube_id = "exampleVideoId"
transcript_json = fetch_transcript(youtube_id, 'json')
print(transcript_json)

Fetching Transcript as Plain Text

# Using a YouTube video ID
youtube_id = "exampleVideoId"
transcript_text = fetch_transcript(youtube_id, 'string')
print(transcript_text)

Fetching Transcript as XML

# Using a YouTube video ID
youtube_id = "exampleVideoId"
transcript_xml = fetch_transcript(youtube_id, 'xml')
print(transcript_xml)

These examples illustrate the flexibility of tube_scriptor in handling different formats and inputs. Choose the format that best suits your needs, whether it's for further processing, display, or storage.

Features

  • Support for fetching transcripts in XML, JSON, Python list, or plain string format.
  • Easy integration into Python projects.
  • Flexible input with support for both YouTube video URLs and video IDs.
  • Lightweight with minimal dependencies.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

This project is licensed under the MIT License.

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

tube_scriptor-2025.5.120740.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tube_scriptor-2025.5.120740-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file tube_scriptor-2025.5.120740.tar.gz.

File metadata

  • Download URL: tube_scriptor-2025.5.120740.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for tube_scriptor-2025.5.120740.tar.gz
Algorithm Hash digest
SHA256 c7e4b02593f2337c2295cfb6939182646a6cd3099f9ba36674ef1fe27c0976f8
MD5 9d813a18b3bab9db9060f04e5e79efb9
BLAKE2b-256 9707daa29ac88d15738ef01ac5ff64293f5460e5fd11e158506c4451b805f0c7

See more details on using hashes here.

File details

Details for the file tube_scriptor-2025.5.120740-py3-none-any.whl.

File metadata

File hashes

Hashes for tube_scriptor-2025.5.120740-py3-none-any.whl
Algorithm Hash digest
SHA256 57545552fc129d330b7a30f03e609753804389f84045f46e9eb74f8930601de0
MD5 2570900230bbac518dace150b23332c6
BLAKE2b-256 2bfd6b58017c95ae6f481a309be5acced4088f61294eb76d93d23ee20c0c497b

See more details on using hashes here.

Supported by

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