diff options
| author | Michael Peter Christen <mc@yacy.net> | 2018-03-10 15:46:53 +0100 |
|---|---|---|
| committer | Michael Peter Christen <mc@yacy.net> | 2018-03-10 15:46:53 +0100 |
| commit | 187075b878f9d6d56bf1fdba3bf70bf0ebe22bbf (patch) | |
| tree | 31289929ef4cd9501cd8b76ae8b615f2590183b9 /source | |
| parent | bcbd0ae1a4ea4550089b82d7ae47b93a8524e787 (diff) | |
added nav filter
Diffstat (limited to 'source')
| -rw-r--r-- | source/net/yacy/cora/protocol/Scanner.java | 1 | ||||
| -rw-r--r-- | source/net/yacy/document/parser/html/ContentScraper.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/net/yacy/cora/protocol/Scanner.java b/source/net/yacy/cora/protocol/Scanner.java index 6d11388aa..8c84931a9 100644 --- a/source/net/yacy/cora/protocol/Scanner.java +++ b/source/net/yacy/cora/protocol/Scanner.java @@ -152,6 +152,7 @@ public class Scanner { if (access != Access.unknown) Scanner.this.services.put(this, access); } } catch (final OutOfMemoryError e) { + e.printStackTrace(); } } public long age() { diff --git a/source/net/yacy/document/parser/html/ContentScraper.java b/source/net/yacy/document/parser/html/ContentScraper.java index 1a4d46bab..36fb1e34c 100644 --- a/source/net/yacy/document/parser/html/ContentScraper.java +++ b/source/net/yacy/document/parser/html/ContentScraper.java @@ -129,6 +129,7 @@ public class ContentScraper extends AbstractScraper implements Scraper { script(TagType.pair),
span(TagType.pair),
div(TagType.pair),
+ nav(TagType.pair),
article(TagType.pair), // html5
time(TagType.pair), // html5 <time datetime>
// tags used to capture tag content
@@ -1020,7 +1021,10 @@ public class ContentScraper extends AbstractScraper implements Scraper { }
/* Parent is not marked as ignored : let's check the current tag */
- if (!ignore && this.ignoreDivClassNames != null && tag != null && TagName.div.name().equals(tag.name)) {
+ if (!ignore &&
+ this.ignoreDivClassNames != null &&
+ tag != null &&
+ (TagName.div.name().equals(tag.name) || TagName.nav.name().equals(tag.name))) {
final String classAttr = tag.opts.getProperty("class", EMPTY_STRING);
final Set<String> classes = ContentScraper.parseSpaceSeparatedTokens(classAttr);
ignore = !Collections.disjoint(this.ignoreDivClassNames, classes);
|
