use of de.herrlock.manga.host.exceptions.NoHosterFoundException in project Manga by herrlock.
the class ChapterList method getInstance.
/**
* creates an instance of {@linkplain ChapterList}, gets the right {@linkplain Details} from the {@linkplain URL} in the given
* {@link DownloadConfiguration}
*
* @param conf
* the {@link DownloadConfiguration} to use
* @return an instance of {@link ChapterList}; when no suitable Hoster can be detected {@code null}
*/
public static ChapterList getInstance(final DownloadConfiguration conf) {
logger.traceEntry("Configuration: {}", conf);
URL url = conf.getUrl();
Hoster h;
try {
h = Hosters.getHostByURL(url);
} catch (NoHosterFoundException ex) {
throw new InitializeException(ex);
}
logger.debug("Selected Hoster: {}", h.getName());
return h.getChapterList(conf);
}
Aggregations