X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fgofetch%2Fsupport%2FSlashdot.java;h=6a5395498de5894657e39311cc68ee3b8f9529e2;hb=2f2c9a91588afcd227d34e91b6e5fb58a0ac115c;hp=5dfa03b227e30e2786d0a3dacf0195c6e5d66096;hpb=737852686d8897331706ed4b902dbd9d5038cb53;p=gofetch.git
diff --git a/src/be/nikiroo/gofetch/support/Slashdot.java b/src/be/nikiroo/gofetch/support/Slashdot.java
index 5dfa03b..6a53954 100644
--- a/src/be/nikiroo/gofetch/support/Slashdot.java
+++ b/src/be/nikiroo/gofetch/support/Slashdot.java
@@ -14,6 +14,11 @@ import org.jsoup.select.Elements;
import be.nikiroo.gofetch.data.Comment;
import be.nikiroo.gofetch.data.Story;
+/**
+ * Support https://slashdot.org/.
+ *
+ * @author niki
+ */
public class Slashdot extends BasicSupport {
@Override
public String getDescription() {
@@ -33,6 +38,7 @@ public class Slashdot extends BasicSupport {
if (titles.size() == 0) {
continue;
}
+
Element title = titles.get(0);
String id = "" + title.attr("id");
@@ -70,7 +76,7 @@ public class Slashdot extends BasicSupport {
}
@Override
- public List getComments(Story story) throws IOException {
+ public void fetch(Story story) throws IOException {
List comments = new ArrayList();
URL url = new URL(story.getUrlInternal());
@@ -81,7 +87,7 @@ public class Slashdot extends BasicSupport {
comments.addAll(getComments(listing));
}
- return comments;
+ story.setComments(comments);
}
private List getComments(Element listing) {