🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

streamsnapper

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamsnapper

StreamSnapper is an intuitive library designed to simplify, improve, and organize YouTube and Youtube Music media streams. It offers scraping functions with higher speed extraction and efficiency with the latest tools to perform such processes.

0.3.1
PyPI
Maintainers
1

StreamSnapper

PyPI - Version PyPI - Downloads PyPI - Code Style PyPI - Format PyPI - Python Compatible Versions

StreamSnapper is an intuitive library designed to simplify, improve, and organize YouTube and Youtube Music media streams. It offers scraping functions with higher speed extraction and efficiency with the latest tools to perform such processes.

Installation (from PyPI)

# Install the stable version of StreamSnapper from PyPI (recommended)
pip install --upgrade streamsnapper

# Install the development version of StreamSnapper from GitHub
pip install --upgrade git+https://github.com/henrique-coder/streamsnapper.git@main

[!Note] If you already have a version installed and want to switch to a different branch (for example, to test new features or fix bugs), you will need to use the --force-reinstall parameter to ensure the upgrade occurs correctly.

Example Usage

from streamsnapper import YouTube


youtube = YouTube(logging=False)

youtube.extract(url="https://www.youtube.com/watch?v=***********", ytdlp_data=None)
youtube.analyze(check_thumbnails=False, retrieve_dislike_count=False)
youtube.analyze_video_streams(preferred_quality="all")
youtube.analyze_audio_streams(preferred_language="source")
youtube.analyze_subtitle_streams()


from streamsnapper import YouTubeExtractor


youtube_extractor = YouTubeExtractor()

print(youtube_extractor.identify_platform(url="https://music.youtube.com/watch?v=***********"))

print(youtube_extractor.extract_video_id(url="https://www.youtube.com/watch?v=***********"))

print(
    youtube_extractor.extract_playlist_id(
        url="https://www.youtube.com/playlist?list=**********************************", include_private=False
    )
)

print(youtube_extractor.search(query="A cool music name", sort_by="relevance", results_type="video", limit=1))

print(
    youtube_extractor.get_playlist_videos(
        url="https://www.youtube.com/playlist?list=**********************************", limit=None
    )
)

print(
    youtube_extractor.get_channel_videos(
        channel_id="************************",
        channel_url="https://www.youtube.com/@********",
        channel_username="********",
        sort_by="newest",
        content_type="videos",
        limit=None,
    )
)

# All functions are documented and have detailed typings, use your development IDE to learn more.

from streamsnapper import Merger


merger = Merger(
    logging=False
)

merger.merge(
    video_path='path/to/video',
    audio_path='path/to/audio',
    output_path='path/to/output',
    ffmpeg_path='local'
)

# All functions are documented and have detailed typings, use your development IDE to learn more.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, fork the repository and create a pull request. You can also simply open an issue and describe your ideas or report bugs. Don't forget to give the project a star if you like it!

  • Fork the project;
  • Create your feature branch ・ git checkout -b feature/{feature_name};
  • Commit your changes ・ git commit -m "{commit_message}";
  • Push to the branch ・ git push origin feature/{feature_name};
  • Open a pull request, describing the changes you made and wait for a review.

Disclaimer

Please note that downloading copyrighted content from some media services may be illegal in your country. This tool is designed for educational purposes only. Use at your own risk.

Keywords

downloader

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts