Reactive youtube parser. Supports RxJava and RxJava 2.
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));
RxJava dependency
implementation 'com.nikolaymanzhos:rxtube:1.0.0'
RxJava 2 dependency
implementation 'com.nikolaymanzhos:rxtube2:1.0.0'
Original parser implementation YouTubeExtractor