本文整理了Java中org.tinymediamanager.scraper.http.Url.<init>()
方法的一些代码示例,展示了Url.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Url.<init>()
方法的具体详情如下:
包路径:org.tinymediamanager.scraper.http.Url
类名称:Url
方法名:<init>
[英]A constructor for inherited classes which needs a special setup
[中]需要特殊设置的继承类的构造函数
代码示例来源:origin: tinyMediaManager/tinyMediaManager
@Override
protected BufferedImage doInBackground() throws Exception {
try {
Url url = new Url(imageUrl);
return ImageCache.createImage(url.getBytesWithRetry(5));
}
catch (Exception e) {
LOGGER.warn("fetch image: " + e.getMessage());
return null;
}
}
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url jsPlayer = new Url("https:" + matcher.group(1).replaceAll("\\\\", ""));
StringWriter writer = new StringWriter();
IOUtils.copy(jsPlayer.getInputStream(), writer, "UTF-8");
代码示例来源:origin: org.tinymediamanager/api-scraper
if (cachedRequest == null) {
Url url = new Url(this.url);
url.headersRequest = headersRequest;
InputStream is = url.getInputStream();
代码示例来源:origin: org.tinymediamanager.plugins/scraper-animated
Url u = new Url(BASE_URL + "movies.json");
u.download(JSON_FILE);
b = readJsonFile();
代码示例来源:origin: org.tinymediamanager.plugins/scraper-imdb
@Override
public Document call() throws Exception {
doc = null;
try {
Url url = new Url(this.url);
url.addHeader("Accept-Language", getAcceptLanguage(language, country));
doc = Jsoup.parse(url.getInputStream(), imdbSite.getCharset().displayName(), "");
}
catch (Exception e) {
getLogger().debug("tried to fetch imdb page " + url, e);
}
return doc;
}
}
代码示例来源:origin: tinyMediaManager/tinyMediaManager
@Override
protected BufferedImage doInBackground() throws Exception {
try {
Url url = new Url(imageUrl);
return Scalr.resize(ImageCache.createImage(url.getBytesWithRetry(5)), Scalr.Method.QUALITY, Scalr.Mode.AUTOMATIC, newSize.width,
newSize.height,
Scalr.OP_ANTIALIAS);
}
catch (Exception e) {
imageUrl = "";
return null;
}
}
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url u = new Url(url);
boolean ok = u.download(cachedFile);
if (ok) {
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url jsonConfigUrl = new Url(youtubeUrl + "&spf=prefetch");
StringWriter writer = new StringWriter();
IOUtils.copy(jsonConfigUrl.getInputStream(), writer, "UTF-8");
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url upd = new Url(uu + "digest.txt?z=" + System.currentTimeMillis()); // cache bust
LOGGER.trace("Checking " + uu);
remoteDigest = IOUtils.toString(upd.getInputStream(), "UTF-8");
LOGGER.info("Update needed...");
Url gd = new Url(remoteUrl + "getdown.txt");
String remoteGD = IOUtils.toString(gd.getInputStream(), "UTF-8");
if (remoteGD.contains("forceUpdate")) {
Url upd = new Url(remoteUrl + "changelog.txt");
changelog = IOUtils.toString(upd.getInputStream(), "UTF-8");
return true;
fallback += "/getdown.txt";
Url upd = new Url(fallback);
InputStream is = upd.getInputStream();
if (is == null) {
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url url1 = new Url(url);
FileOutputStream outputStream = new FileOutputStream(filename);
InputStream is = url1.getInputStream();
代码示例来源:origin: tinyMediaManager/tinyMediaManager
try {
String providedFiletype = FilenameUtils.getExtension(urlAsString);
Url url = new Url(urlAsString);
Path file = folder.resolve("fanart" + i + "." + providedFiletype);
LOGGER.debug("writing extrafanart " + file.getFileName());
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url url1 = new Url(url);
is = url1.getInputStreamWithRetry(5);
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url url = new Url(imageUrl);
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url url1 = new Url(artworkUrl);
tempFile = movie.getPathNIO().resolve(filename + ".part");
outputStream = new FileOutputStream(tempFile.toFile());
代码示例来源:origin: tinyMediaManager/tinyMediaManager
Url url = new Url(urlToArtwork);
InputStream is = url.getInputStream();
if (url.isFault()) {
代码示例来源:origin: org.tinymediamanager.plugins/scraper-ofdb
try {
url = new Url(searchString);
InputStream in = url.getInputStream();
Document doc = Jsoup.parse(in, "UTF-8", "");
url = new Url(BASE_URL + "/" + StrgUtils.substr(filme.first().toString(), "href=\\\"(.*?)\\\""));
in = url.getInputStream();
doc = Jsoup.parse(in, "UTF-8", "");
代码示例来源:origin: tinyMediaManager/tinyMediaManager
art.setPreviewUrl(tfImageUrl.getText());
Url url = new Url(art.getPreviewUrl());
final BufferedImage bufferedImage = ImageCache.createImage(url.getBytesWithRetry(5));
代码示例来源:origin: org.tinymediamanager.plugins/scraper-ofdb
LOGGER.debug("search with imdbId: " + imdb);
Url url = new Url(searchString);
InputStream in = url.getInputStream();
Document doc = Jsoup.parse(in, "UTF-8", "");
LOGGER.debug("search for everything: " + query);
Url url = new Url(searchString);
InputStream in = url.getInputStream();
Document doc = Jsoup.parse(in, "UTF-8", "");
代码示例来源:origin: org.tinymediamanager.plugins/scraper-imdb
Url url = new Url(imdbSite.getSite() + "/title/" + wantedEpisode.ids.get(providerInfo.getId()) + "/fullcredits");
url.addHeader("Accept-Language", "en"); // force EN for parsing by HTMl texts
Document doc = Jsoup.parse(url.getInputStream(), imdbSite.getCharset().displayName(), "");
代码示例来源:origin: tinyMediaManager/tinyMediaManager
url = new Url(art.getPreviewUrl());
BufferedImage bufferedImage = ImageCache.createImage(url.getBytesWithRetry(5));
内容来源于网络,如有侵权,请联系作者删除!