Packages

class SignatureDecipher[F[_]] extends AnyRef

Extracts and caches decode function from YouTube html5 player. Uses JavaScript Engine to execute decoding function. It may be improved by caching desipher results and so on.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SignatureDecipher
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SignatureDecipher()(implicit M: MonadError[F, Throwable])

Type Members

  1. type DecipherFunction = F[(String) ⇒ String]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def buildDecipherFunc(player: String): Invocable
    Attributes
    protected
  6. def calculatePlayerUrl(playerUrl: String): String

    Player url specifed in video page differs from time to time.

    Player url specifed in video page differs from time to time. Sometimes it is full youtube domain with or w/o protocol, sometimes relative part. Here we want to build valid player download link

    playerUrl

    usually malformed url obtained from video page.

    returns

    valid player download url

    Attributes
    protected
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def decipher(playerUrl: String)(signature: String): F[String]

    attempts to decode signature using player stored before.

    attempts to decode signature using player stored before. No attempt to download will be made.

    playerUrl

    player url used as a key. No attemp to register

    signature

    to decode

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def extractMainFuncBody(player: String, procName: String): String
    Attributes
    protected
  12. def extractMainFuncName(player: String): String
    Attributes
    protected
  13. def extractSubProc(player: String, mainProcBody: String): String
    Attributes
    protected
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. val map: TrieMap[String, DecipherFunction]
    Attributes
    protected
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. def registerPlayer(playerUrl: String, downloadFunc: (String) ⇒ F[String]): DecipherFunction

    Downloads player, attempts to find decipher function and it's requirements, wrap it with custom name and store for future uses.

    Downloads player, attempts to find decipher function and it's requirements, wrap it with custom name and store for future uses. Subsequental call with the same player url should not download it again, Alternative solution is to store the whole player and call it's functions.

    playerUrl

    where to get player

    downloadFunc

    which function to use to download player

    returns

    Invocable function

  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped