GithubHelp home page GithubHelp logo

dino1537 / youtube_music Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 778 KB

This Python script uses the `rich` library to search YouTube, display results in a formatted table, and play selected audio with user choice of media player (mpv, mplayer, vlc).

License: MIT License

Python 100.00%

youtube_music's Introduction

Youtube_Music

This Python script uses the rich library to search YouTube, display results in a formatted table, and play selected audio with user choice of media player (mpv, mplayer, vlc).

Code Description:

This Python script utilizes the rich, pytube, and youtubesearchpython libraries to create a user-friendly YouTube audio player. It enables users to search for YouTube videos, presents search results in a visually appealing table, and plays the selected audio with a choice of media players (mpv, mplayer, vlc).

Dependencies:

  1. rich library (for enhanced console output)
  2. pytube library (for YouTube video handling)
  3. youtubesearchpython library (for YouTube video search)
  4. Media players: mpv, mplayer, vlc (for audio playback)

Instructions:

  1. Installation:

    Ensure you have Python 3.x installed on your system.

    Install required Python libraries:

    pip install rich pytube youtubesearchpython
    

    Make sure you have one of the supported media players (mpv, mplayer, vlc) installed on your system.

  2. Running the Script:

    Save the script to a Python file (e.g., ytmusic.py).

    Open your terminal and navigate to the directory containing the script.

    Run the script using the following command:

    python ytmusic.py
    
  3. Using the Script:

    • Enter a YouTube search query to search for videos.
    • Results are displayed in a formatted table.
    • Select a video by entering its corresponding number.
    • Choose a media player (mpv, mplayer, vlc) for playback.
    • Enjoy streaming and listening to audio from YouTube videos.
    • Enter 'quit' to exit the script.

This script provides an interactive and visually appealing way to search for YouTube videos and play their audio content with your preferred media player.

yt_music output

yt_music1_2023-09-17_10:12:22

youtube_music's People

Contributors

dino1537 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.