import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
*/
public abstract class BasicSupport {
/**
- * The downloader to use for all web sites via
+ * The {@link Downloader} to use for all web sites via
* {@link BasicSupport#open(URL)}
*/
static private Downloader downloader = new Downloader("gofetcher");
* in case of I/O error
*
*/
+ @SuppressWarnings("unused")
public void login() throws IOException {
}
id = "0" + id;
}
} else {
- id = date.replace(":", "_").replace("+", "_");
+ id = date.replace(":", "_").replace("+", "_")
+ .replace("/", "-");
}
date = date(date);
case SLASHDOT:
support = new Slashdot();
break;
- case PIPEDOT:
- support = new Pipedot();
- break;
case LWN:
support = new LWN();
break;
case SEPT_SUR_SEPT:
support = new SeptSurSept();
break;
+ case REDDIT:
+ support = new Reddit();
+ break;
}
if (support != null) {
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;
}
}