Skip to content

x45iq/jtube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badge-jdk License badge

jtube

Java library for parsing: videos,shorts,playlists,channels and downloading videos

Description

I don't like web downloaders with adds and low info that's why I present to you jtube.

jtube is a lightweight library written in Java. It has some dependencies, but that's not a problem.

jtube allows you to get information about videos and more, and then download them with the ability to track the status.

Features

  • Support for video,shorts,playlist,channel
  • Support for downloading video,subtitles,audio tracks with special language
  • Ability to capture thumbnail URL
  • Extensively documented source code

Quickstart

Will be later

Installation

jtube requires an installation of Java 8+

To install from Gradle:

implementation 'io.github.x45iq:jtube:1.0.1'

To install from Maven:

<dependency>
    <groupId>io.github.x45iq</groupId>
    <artifactId>jtube</artifactId>
    <version>1.0.1</version>
</dependency>

Using jtube

To get video by url

if(VideoParser.isUrlSupported(url)){
    Video video = new VideoParser().parse(url);
}

To get all videos in playlist

if(PlaylistParser.isUrlSupported(url)) {
    Playlist playlist = new PlaylistParser().parse(url);
    playlist.videos().forEach(System.out::println);
}

To get all videos in channel

if(ChannelParser.isUrlSupported(url)) {
    Channel channel = new ChannelParser().parse(url);
    channel.videos().forEach(System.out::println);
}

To download any StreamingData from video

StreamingData streamingData = ...;
File folderToSave = new File("...");
File result = new StreamingDataDownloader.Builder()
        .streamingData(streamingData)
        .folder(folderToSave)
        .progressCallback(System.out::println)
        .build()
        .download();