Reddit: fix problem with new kind of html (wip)
[gofetch.git] / src / be / nikiroo / gofetch / support / BasicSupport.java
index 42761c9a82d1a7cd39bcd3bc96dd46e862f608a2..17a3c151750e9c7e56169fe4fd8be87b9eb39855 100644 (file)
@@ -133,9 +133,9 @@ public abstract class BasicSupport {
                                                id = "0" + id;
                                        }
                                } else {
-                                       id = date.replace(":", "_").replace("+", "_");
+                                       id = date.replace(":", "_").replace("+", "_").replace("/", "-");
                                }
-
+                               
                                date = date(date);
 
                                list.add(new Story(getType(), id, title, author, date, categ,
@@ -601,6 +601,9 @@ public abstract class BasicSupport {
                        case SEPT_SUR_SEPT:
                                support = new SeptSurSept();
                                break;
+                       case REDDIT:
+                               support = new Reddit();
+                               break;
                        }
 
                        if (support != null) {
@@ -819,7 +822,7 @@ public abstract class BasicSupport {
                        Date dat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX")
                                        .parse(date.trim());
                        return out.format(dat);
-               } catch (ParseException e) {
+               } catch (Exception e) {
                        return date;
                }
        }