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.
- Alphabetic
- By Inheritance
- SignatureDecipher
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SignatureDecipher()(implicit M: MonadError[F, Throwable])
Type Members
- type DecipherFunction = F[(String) ⇒ String]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
buildDecipherFunc(player: String): Invocable
- Attributes
- protected
-
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
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
extractMainFuncBody(player: String, procName: String): String
- Attributes
- protected
-
def
extractMainFuncName(player: String): String
- Attributes
- protected
-
def
extractSubProc(player: String, mainProcBody: String): String
- Attributes
- protected
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
map: TrieMap[String, DecipherFunction]
- Attributes
- protected
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )