Small fixes in different places
[gofetch.git] / src / be / nikiroo / gofetch / support / Slashdot.java
index 4746cc2eacfb28b41d3983ae6baddd34e5939dd0..b3a779da62d229469346f8a9455b1e01b160ab9d 100644 (file)
@@ -49,8 +49,8 @@ public class Slashdot extends BasicSupport {
                        }
 
                        Elements links = title.getElementsByTag("a");
-                       String intUrl = null;
-                       String extUrl = null;
+                       String intUrl = "";
+                       String extUrl = "";
                        if (links.size() > 0) {
                                intUrl = links.get(0).absUrl("href");
                        }
@@ -92,6 +92,9 @@ public class Slashdot extends BasicSupport {
                        Element dateElement = doc.getElementsByTag("time").first();
                        if (dateElement != null) {
                                date = StringUtils.unhtml(dateElement.text()).trim();
+                               if (date.startsWith("on ")) {
+                                       date = date.substring("on ".length());
+                               }
                        }
 
                        list.add(new Story(getType(), id, title.text(), author, date,