youtubegrabber

Youtube video grabber

License

License

GroupId

GroupId

ru.shubert
ArtifactId

ArtifactId

youtubegrabber_2.12
Last Version

Last Version

2.2
Release Date

Release Date

Type

Type

jar
Description

Description

youtubegrabber
Youtube video grabber
Project URL

Project URL

https://github.com/lure/YoutubeGrabber
Project Organization

Project Organization

ru.shubert
Source Code Management

Source Code Management

https://github.com/lure/YoutubeGrabber

Download youtubegrabber_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/ru.shubert/youtubegrabber_2.12/ -->
<dependency>
    <groupId>ru.shubert</groupId>
    <artifactId>youtubegrabber_2.12</artifactId>
    <version>2.2</version>
</dependency>
// https://jarcasting.com/artifacts/ru.shubert/youtubegrabber_2.12/
implementation 'ru.shubert:youtubegrabber_2.12:2.2'
// https://jarcasting.com/artifacts/ru.shubert/youtubegrabber_2.12/
implementation ("ru.shubert:youtubegrabber_2.12:2.2")
'ru.shubert:youtubegrabber_2.12:jar:2.2'
<dependency org="ru.shubert" name="youtubegrabber_2.12" rev="2.2">
  <artifact name="youtubegrabber_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='ru.shubert', module='youtubegrabber_2.12', version='2.2')
)
libraryDependencies += "ru.shubert" % "youtubegrabber_2.12" % "2.2"
[ru.shubert/youtubegrabber_2.12 "2.2"]

Dependencies

compile (5)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.7
org.apache.httpcomponents : httpclient jar 4.3.3
io.circe : circe-parser_2.12 jar 0.11.1
org.typelevel : cats-core_2.12 jar 1.4.0
com.typesafe.scala-logging : scala-logging_2.12 jar 3.9.2

test (2)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
org.scalatest : scalatest_2.12 jar 3.0.4

Project Modules

There are no modules declared in this project.

YoutubeGrabber

Build Status Maven Central

Module that extracts downloadable video and audio streams from youtube. Basically you want exactly one you YouTubeQuery instance across all your application, as decipher engine may be somewhat costly to create and keep around in multiple instances. Sometimes streams are protected by different signature type and in some cases for very new player.js or obfuscation methods this implementation may be unable to decrypt signature. in that case appropriate message will be logged and stream will be omitted from output map.

Usage: To use the grabber, you'll need to provide any biased container, or anything for what MonadError typeclass implementation exists / may be implemented.

  import cats.implicits._
  val result = new YouTubeQuery[Try]().getStreams(args.head)

videoOnly = true will return just two or three streams of video paired with audio. Otherwise all the available streams will be returned. Youtube does not provide 1080+audio anymore (may be it is temporary decision).

YouTubeConstants.scala holds a dictionary of known stream types, use it to render basic information to user if needed.

Adding things to projects:

SBT:

libraryDependencies += "ru.shubert" %% "youtubegrabber" % "2.8"

Gradle

implementation "ru.shubert:youtubegrabber_{scala_version}:2.8"

Maven

<properties>
  ...
  <scala.major>%put your version here%</scala.major>
</properties>
<dependency>
  <groupId>ru.shubert</groupId>
  <artifactId>youtubegrabber_${scala.major}</artifactId>
  <version>2.0</version>
</dependency>

Docker

Existing image

$ docker pull lure/grabber:v2.8
$ docker run --rm lure/grabber:v2.8 https://www.youtube.com/watch?v=I3loMuHnYqw

Or rebuild from sources

$./docker/build.sh
$ docker run --rm lure/grabber:v2.8 https://www.youtube.com/watch?v=I3loMuHnYqw

Versions

Version
2.2
2.1
2.0
1.9
1.8
1.7
1.6
1.5
1.4
1.3