Coder Social home page Coder Social logo

youtube_chat_bot's Introduction

YouTube Live Chat Notifier


This Python script allows you to monitor the live chat of a YouTube video and receive notifications on WhatsApp for specific messages or events.

Requirements:

  • Python 3
  • Google API client library (google-api-python-client)
  • Google Auth Library (google-auth)
  • Google OAuth Library (google-auth-oauthlib)
  • requests library

Installation:

  1. Install the required libraries:

    pip install -r requirements.txt
    
  2. Ensure you have configure.py with your phone_number and api_key for WhatsApp API.

  3. Ensure you have credentials.json with your Google API credentials.

Usage:

Run the script with the following command:

python chat_youtube.py <youtube_live_url> <author_name_to_search>
  • <youtube_live_url>: The URL of the YouTube live stream with live chat enabled.
  • <author_name_to_search>: The name of the author whose messages you want to monitor.

Description:

  • The script authenticates the YouTube API using OAuth 2.0 and fetches the live chat ID of the provided YouTube live stream URL.

  • It then continuously monitors the live chat of the specified video and prints incoming messages.

  • If a message from the specified author is found, it sends a notification to the provided WhatsApp number using the CallMeBot API.

  • It also detects Google Forms or Docs links in the messages and notifies when they are posted.

Limitations:

  • The script must be kept running during the live stream to monitor the chat continuously.

  • The YouTube live stream must have live chat enabled and accessible via the YouTube Data API.

Note:

  • Ensure that the provided YouTube video URL is live and has active chat.

  • Make sure your Google API credentials are valid and have the necessary permissions for accessing the YouTube Data API.

  • Check the WhatsApp API usage limits to avoid rate limiting issues.

  • Ensure that the configure.py and credentials.json files are correctly set up with your API keys and credentials respectively.

youtube_chat_bot's People

Contributors

miguelflj avatar migueluff 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.