*/
public abstract class BasicSupport {
/** The downloader to use for all websites. */
- protected static Downloader downloader = new Downloader("gofetcher");
+ static protected Downloader downloader = new Downloader("gofetcher");
static private String preselector;
continue;
}
- if (id.isEmpty()) {
+ if (!id.isEmpty()) {
+ while (id.length() < 10) {
+ id = "0" + id;
+ }
+ } else {
id = date.replace(":", "_").replace("+", "_");
}
@Override
protected String getArticleId(Document doc, Element article) {
- String id = getArticleIntUrl(doc, article).replaceAll("[^0-9]", "");
- while (id.length() < 10) {
- id = "0" + id;
- }
-
- return id;
+ return getArticleIntUrl(doc, article).replaceAll("[^0-9]", "");
}
@Override