Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Commit 233e935

Browse files
authored
Added outerhtml (#5)
* Added outerhtml
1 parent 50661a4 commit 233e935

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scraper-nodes-dev/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id("de.jjohannes.extra-java-module-info")
55
}
66

7-
version = '0.5.0'
7+
version = '0.6.0'
88

99
extraJavaModuleInfo {
1010
module("jsoup-1.12.1.jar", "org.jsoup", "1.12.1") {

scraper-nodes-dev/src/main/java/scraper/nodes/dev/html/HtmlCssQuery.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* Executes a css query on a html String.
2222
*/
23-
@NodePlugin("0.3.0")
23+
@NodePlugin("0.4.0")
2424
public final class HtmlCssQuery implements StreamNode {
2525

2626
/** Raw html String */
@@ -73,6 +73,9 @@ public void process(@NotNull StreamNodeContainer n, @NotNull FlowMap o) {
7373
case ATTR:
7474
copy.output(put, element.attr(attr));
7575
break;
76+
case OUTERHTML:
77+
copy.output(put, element.outerHtml());
78+
break;
7679
}
7780

7881
n.streamFlowMap(o, copy);
@@ -82,5 +85,5 @@ public void process(@NotNull StreamNodeContainer n, @NotNull FlowMap o) {
8285
}
8386

8487

85-
enum ElementOutput { TEXT, HTML, ATTR }
88+
enum ElementOutput { TEXT, HTML, ATTR, OUTERHTML }
8689
}

0 commit comments

Comments
 (0)