*/
abstract public int searchPages(String search) throws IOException;
+ /**
+ * Search for the given tag and return the number of pages of results of
+ * stories satisfying this tag.
+ *
+ * @param tag
+ * the tag to search for
+ *
+ * @return a number of pages
+ *
+ * @throws IOException
+ * in case of I/O error
+ */
+ abstract public int searchPages(SearchableTag tag) throws IOException;
+
/**
* Search for the given term and return a list of stories satisfying this
* search term.
* in case of I/O error
*/
protected Document load(URL url, boolean stable) throws IOException {
- return DataUtil.load(Instance.getCache().open(url, support, stable),
- "UTF-8", url.toString());
+ return DataUtil.load(Instance.getInstance().getCache().open(url, support, stable), "UTF-8", url.toString());
}
/**
if (type != null) {
switch (type) {
case FIMFICTION:
- // TODO
+ // TODO searchable for FIMFICTION
break;
case FANFICTION:
support = new Fanfiction(type);
break;
- case MANGAFOX:
- // TODO
+ case MANGAHUB:
+ // TODO searchable for MANGAHUB
break;
case E621:
- // TODO
+ // TODO searchable for E621
break;
case YIFFSTAR:
- // TODO
+ // TODO searchable for YIFFSTAR
break;
case E_HENTAI:
- // TODO
+ // TODO searchable for E_HENTAI
break;
case MANGA_LEL:
support = new MangaLel();