Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.
/ RxTube Public archive

Handy YouTube links parser with RxJava support

Notifications You must be signed in to change notification settings

nikolai-manzhos/RxTube

Repository files navigation

RxTube

CircleCI

Reactive youtube parser. Supports RxJava and RxJava 2.

Usage

String youtubeLink = "http://youtube.com/watch?v=0IKHxjkgop4";

RxTube rxTube = RxTubeFactory.create(getApplicationContext());
rxTube.extract(youtubeLink)
        .observeOn(AndroidSchedulers.mainThread())
        .subscribeOn(Schedulers.io())
        .subscribe(videoResponse -> {
            SparseArray<YtFile> ytFiles = videoResponse.getYtFiles();
            int itag = 22; // HD quality
            String downloadUrl = ytFiles.get(itag).getUrl();
            Log.d(TAG, "onExtractionComplete: " + downloadUrl);
        }, err -> Log.e(TAG, "", err));

Gradle

RxJava dependency

implementation 'com.nikolaymanzhos:rxtube:1.0.0'

RxJava 2 dependency

implementation 'com.nikolaymanzhos:rxtube2:1.0.0'

Reference

Original parser implementation YouTubeExtractor

About

Handy YouTube links parser with RxJava support

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published