Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.26 KB

README.md

File metadata and controls

36 lines (29 loc) · 1.26 KB

StreamAlerter

A simple tool to check if a Youtube channel is livestreaming, without using the Google API.

This application uses a Java application called Jsoup to get the raw HTML information of the homepage of a Youtube channel. It then searches for a specific HTML tag and if it has a specific state then it indicates that the channel is streaming. This allows somebody to seamlessley check if a channel is livestreaming without needing to set up the Google API.

Simple Example

pom.xml

<repositories>
  <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>com.github.dec4234</groupId>
    <artifactId>StreamAlerter</artifactId>
    <version>master</version>
  </dependency>
</dependencies>

Your main class

YoutubeStreamCheck ytsc = new YoutubeStreamCheck(url -> {
    // Code to be executed when the person is streaming
}, "CHANNEL ID HERE", 5); // 5 means it checks every 5 seconds

The channel ID is the Youtube ID of that channel, which you must find and put in the 2nd arg for it to check. The url is the unique URL for that livestream, which allows for somebody to be linked directly to the livestream rather than the streamer's homepage.