import be.nikiroo.gofetch.data.Comment;
import be.nikiroo.gofetch.data.Story;
+/**
+ * Support <a href='https://slashdot.org/'>https://slashdot.org/</a>.
+ *
+ * @author niki
+ */
public class Slashdot extends BasicSupport {
@Override
public String getDescription() {
if (titles.size() == 0) {
continue;
}
+
Element title = titles.get(0);
String id = "" + title.attr("id");
}
@Override
- public List<Comment> getComments(Story story) throws IOException {
+ public void fetch(Story story) throws IOException {
List<Comment> comments = new ArrayList<Comment>();
URL url = new URL(story.getUrlInternal());
comments.addAll(getComments(listing));
}
- return comments;
+ story.setComments(comments);
}
private List<Comment> getComments(Element listing) {