mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-24 14:45:56 +00:00
Attempt to filter out embedded images.
(cherry picked from commit aa5ff1dbdaefd04652a9c66506d20f1a6ae01dc3)
This commit is contained in:
@@ -445,18 +445,20 @@ public class ExtractorHTML extends ContentExtractor implements InitializingBean
|
||||
} else if (attr.start(5) > -1) {
|
||||
// SRC etc.
|
||||
CharSequence context = elementContext(element, attr.group(5));
|
||||
|
||||
// true, if we expect another HTML page instead of an image etc.
|
||||
final Hop hop;
|
||||
|
||||
if(!framesAsEmbeds
|
||||
&& (elementStr.equalsIgnoreCase(FRAME) || elementStr
|
||||
.equalsIgnoreCase(IFRAME))) {
|
||||
hop = Hop.NAVLINK;
|
||||
} else {
|
||||
hop = Hop.EMBED;
|
||||
if (!context.toString().toLowerCase().startsWith("data:")) {
|
||||
|
||||
// true, if we expect another HTML page instead of an image etc.
|
||||
final Hop hop;
|
||||
|
||||
if (!framesAsEmbeds
|
||||
&& (elementStr.equalsIgnoreCase(FRAME) || elementStr
|
||||
.equalsIgnoreCase(IFRAME))) {
|
||||
hop = Hop.NAVLINK;
|
||||
} else {
|
||||
hop = Hop.EMBED;
|
||||
}
|
||||
processEmbed(curi, value, context, hop);
|
||||
}
|
||||
processEmbed(curi, value, context, hop);
|
||||
} else if (attr.start(6) > -1) {
|
||||
// CODEBASE
|
||||
codebase = (value instanceof String)?
|
||||
|
||||
Reference in New Issue
Block a user