Skip to main content

PyTuneGrab

Welcome to the PyTuneGrab documentation! PyTuneGrab is a Python tool designed for downloading and converting YouTube audio and video content. It provides a convenient interface for fetching content, converting videos to MP3 audio, and organizing your media library.

Main Features

Audio Download: Download audio from YouTube videos and convert them to the mp3 format. Video Download: Download videos from YouTube. Playlist Handling: Efficiently download and convert playlists.

Requirements

  • Python 3.7 or higher
  • FFmpeg
  • PyTube
  • MoviePy

How to Use

  1. Install the required libraries:
pip install pytube moviepy
  1. Make sure you have installed FFmpeg.

  2. Import the relevant classes from PyTuneGrab in your Python script.

  3. Create a instance of the desired downloader class.

The download will be done in a folder called "downloads" in the root folder of the directory, if an output path is not provided

Below, we present basic examples of use:

Downloading and Converting Audio

from pytunegrab.core import YTDownloader

downloader = YTDownloader()

# Download and convert a single video
video_url = "https://www.youtube.com/watch?v=your_video_id"
converted_audio_path = downloader.download_audio(video_url)

print(f"Converted Audio: {video_url} -> {converted_audio_path}")

Downloading and Converting Video

from pytunegrab import YTDownloader

downloader = YTDownloader()

# Download a video
video_url = "https://www.youtube.com/watch?v=your_video_id"
downloaded_video_path = downloader.download_video(video_url)

print(f"Downloaded Video: {video_url} -> {downloaded_video_path}")

The script will identify whether it is a playlist or not.

All the downloaders follow a similar pattern. You just need to specify the type of content you want to download, whether audio, video, or a playlist.

Roadmap

We are committed to expanding the functionalities of this library. Planned future enhancements include:

Improved handling of video resolutions. Support for additional audio formats.

Contact

Email: dudulj@live.com

GitHub: edududs

License

MIT License

Copyright (c) 2023 Eduardo Lima de Jesus

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for pytunegrab 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytunegrab 0.1.1
File Size Uploaded
pytunegrab-0.1.1.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytunegrab 0.1.1
File Interpreter ABI Platform
pytunegrab-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / pytunegrab-0.1.1.tar.gz

Download URL pytunegrab-0.1.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
35e17099e6645a0a0648c1f6eb8bdf55014692c68f529aaff5933abd165153f8
BLAKE2b-256 checksum
How to use checksums
06d0760ac040825e76959ebadebff2a6288b09eb8c380f6f5fb1ec91642e71e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release files / pytunegrab-0.1.1-py3-none-any.whl

Download URL pytunegrab-0.1.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
784dc6d78396d37ce9b036561c4981e6e8b1df7f6edced585cddf9c2c3aa1d46
BLAKE2b-256 checksum
How to use checksums
f851d3b8f57b5c86a89c1fcb07a4a7fce53cf0d563c5c55d4121f8d4ebba1735
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page