ytb2subtitles


Nameytb2subtitles JSON
Version 2024.10.27 PyPI version JSON
download
home_pageNone
Summary🦜 Youtube to Audio by Andrew A Levin
upload_time2024-10-27 18:33:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords ytb2audio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # YouTube Subtitles Fetcher

`YouTube Subtitles Fetcher` is a command-line tool that retrieves subtitles (with optional translations) from YouTube videos. This tool is ideal for quickly extracting YouTube transcripts with support for multiple languages.

## Features

- Fetches subtitles for a given YouTube video URL
- Supports translations into a specified language (if available)
- Command-line interface for easy integration into scripts or workflows

## Installation

First, install the package via pip:

```bash
pip install ytb2subtitles
```

## Usage

Use the command-line tool to fetch subtitles by providing a YouTube URL and optionally, a language code.

Command-Line Example

To retrieve subtitles from a YouTube video:


ytb2subtitles https://www.youtube.com/watch?v=example_video_id

To retrieve subtitles in a specific language:

ytb2subtitles https://www.youtube.com/watch?v=example_video_id --language en

Code Example

You can also import this tool as a module in your Python code:

from ytb2subtitles import get_subtitles

url = "https://www.youtube.com/watch?v=example_video_id"
subtitles = get_subtitles(url, lang="en")
print(subtitles)

Command-Line Arguments

	•	url (required): The YouTube video URL.
	•	--language or --lang (optional): The language code for subtitles (default is the original language).

Requirements

	•	Python 3.x
	•	pytube
	•	youtube-transcript-api

Contributing

We welcome contributions! If you find a bug or have an idea for a feature, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ytb2subtitles",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "\"A. Great Maintainer\" <maintainer@example.com>",
    "keywords": "ytb2audio",
    "author": null,
    "author_email": "Andrew Levin <author@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/db/ca/291b01ddb2b8cef7e2bac9eb3e202388fed7371cabcaa2f63c0d3320c26c/ytb2subtitles-2024.10.27.tar.gz",
    "platform": null,
    "description": "# YouTube Subtitles Fetcher\n\n`YouTube Subtitles Fetcher` is a command-line tool that retrieves subtitles (with optional translations) from YouTube videos. This tool is ideal for quickly extracting YouTube transcripts with support for multiple languages.\n\n## Features\n\n- Fetches subtitles for a given YouTube video URL\n- Supports translations into a specified language (if available)\n- Command-line interface for easy integration into scripts or workflows\n\n## Installation\n\nFirst, install the package via pip:\n\n```bash\npip install ytb2subtitles\n```\n\n## Usage\n\nUse the command-line tool to fetch subtitles by providing a YouTube URL and optionally, a language code.\n\nCommand-Line Example\n\nTo retrieve subtitles from a YouTube video:\n\n\nytb2subtitles https://www.youtube.com/watch?v=example_video_id\n\nTo retrieve subtitles in a specific language:\n\nytb2subtitles https://www.youtube.com/watch?v=example_video_id --language en\n\nCode Example\n\nYou can also import this tool as a module in your Python code:\n\nfrom ytb2subtitles import get_subtitles\n\nurl = \"https://www.youtube.com/watch?v=example_video_id\"\nsubtitles = get_subtitles(url, lang=\"en\")\nprint(subtitles)\n\nCommand-Line Arguments\n\n\t\u2022\turl (required): The YouTube video URL.\n\t\u2022\t--language or --lang (optional): The language code for subtitles (default is the original language).\n\nRequirements\n\n\t\u2022\tPython 3.x\n\t\u2022\tpytube\n\t\u2022\tyoutube-transcript-api\n\nContributing\n\nWe welcome contributions! If you find a bug or have an idea for a feature, please open an issue or submit a pull request.\n\nLicense\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\ud83e\udd9c Youtube to Audio by Andrew A Levin",
    "version": "2024.10.27",
    "project_urls": {
        "Bug Reports": "https://github.com/andrewalevin",
        "Funding": "https://donate.pypi.org",
        "Homepage": "https://github.com/andrewalevin",
        "Say Thanks!": "https://github.com/andrewalevin",
        "Source": "https://github.com/andrewalevin"
    },
    "split_keywords": [
        "ytb2audio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3340a3f20a62e8a7df2078325f360bd3815e93585608d5079003abe4f3c7ba41",
                "md5": "aa128094a28544559a477fadd65a1f30",
                "sha256": "ff35ab4bfc8a4297a6351cf4f08f83107e022bbff6f856ef8641f11a120b4689"
            },
            "downloads": -1,
            "filename": "ytb2subtitles-2024.10.27-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa128094a28544559a477fadd65a1f30",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3365,
            "upload_time": "2024-10-27T18:33:03",
            "upload_time_iso_8601": "2024-10-27T18:33:03.012053Z",
            "url": "https://files.pythonhosted.org/packages/33/40/a3f20a62e8a7df2078325f360bd3815e93585608d5079003abe4f3c7ba41/ytb2subtitles-2024.10.27-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbca291b01ddb2b8cef7e2bac9eb3e202388fed7371cabcaa2f63c0d3320c26c",
                "md5": "2ed308a0c6b185a16962f2c7f1ef5a74",
                "sha256": "b824e017615d7be73f97a6d48205b87459312d8a24aeba42c9767736a1e26fae"
            },
            "downloads": -1,
            "filename": "ytb2subtitles-2024.10.27.tar.gz",
            "has_sig": false,
            "md5_digest": "2ed308a0c6b185a16962f2c7f1ef5a74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3249,
            "upload_time": "2024-10-27T18:33:04",
            "upload_time_iso_8601": "2024-10-27T18:33:04.256783Z",
            "url": "https://files.pythonhosted.org/packages/db/ca/291b01ddb2b8cef7e2bac9eb3e202388fed7371cabcaa2f63c0d3320c26c/ytb2subtitles-2024.10.27.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-27 18:33:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ytb2subtitles"
}
        
Elapsed time: 1.13762s