class
DefaultImageExtractor extends ImageExtractor
Instance Constructors
-
new
DefaultImageExtractor(targetUrl: String, doc: Document, config: Configuration)
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
checkForKnownElements: Option[Image]
-
def
clone(): AnyRef
-
def
critical(t: Throwable, msg: String, refs: Any*): Unit
-
def
critical(msg: String, refs: Any*): Unit
-
def
debug(t: Throwable, msg: String, refs: Any*): Unit
-
def
debug(msg: String, refs: Any*): Unit
-
val
doc: Document
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
def
getAllImages: ArrayList[Element]
-
def
getBestImage(): Option[Image]
-
final
def
getClass(): Class[_]
-
def
getDepthLevel(node: Element, parentDepth: Int, siblingDepth: Int): Option[DepthTraversal]
-
def
getImageCandidates(node: Element): Option[ArrayList[Element]]
-
def
getImagesFromNode(node: Element): Option[Elements]
-
def
getNode(node: Element): Option[Element]
-
def
hashCode(): Int
-
def
info(t: Throwable, msg: String, refs: Any*): Unit
-
def
info(msg: String, refs: Any*): Unit
-
final
def
isInstanceOf[T0]: Boolean
-
def
logPrefix: String
-
def
logger: Logger
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
trace(t: Throwable, msg: String, refs: Any*): Unit
-
def
trace(msg: String, refs: Any*): Unit
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
warn(t: Throwable, msg: String, refs: Any*): Unit
-
def
warn(msg: String, refs: Any*): Unit
Inherited from AnyRef
Inherited from Any
This image extractor will attempt to find the best image nearest the article. Unfortunately this is a slow process since we're actually downloading the image itself to inspect it's actual height/width and area metrics since most of the time these aren't in the image tags themselves or can be falsified. We'll weight the images in descending order depending on how high up they are compared to the top node content
//todo this is a straight java to scala conversion, need to add the nicities of scala, all these null checks make me dizzy