edu.uci.ics.crawler4j.url.WebURL.getPath()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中edu.uci.ics.crawler4j.url.WebURL.getPath()方法的一些代码示例,展示了WebURL.getPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebURL.getPath()方法的具体详情如下:
包路径:edu.uci.ics.crawler4j.url.WebURL
类名称:WebURL
方法名:getPath

WebURL.getPath介绍

暂无

代码示例

代码示例来源:origin: yasserg/crawler4j

  1. private Set<WebURL> parseOutgoingUrls(WebURL referringPage) throws UnsupportedEncodingException {
  2. Set<String> extractedUrls = extractUrlInCssText(this.getTextContent());
  3. final String pagePath = referringPage.getPath();
  4. final String pageUrl = referringPage.getURL();
  5. Set<WebURL> outgoingUrls = new HashSet<>();
  6. for (String url : extractedUrls) {
  7. String relative = getLinkRelativeTo(pagePath, url);
  8. String absolute = getAbsoluteUrlFrom(URLCanonicalizer.getCanonicalURL(pageUrl), relative);
  9. WebURL webURL = new WebURL();
  10. webURL.setURL(absolute);
  11. outgoingUrls.add(webURL);
  12. }
  13. return outgoingUrls;
  14. }

代码示例来源:origin: tim232385/WebVideoBot

  1. public String getEmbedKey(WebURL webURL) {
  2. final Pattern EMBED_PATTERN = Pattern.compile("(\\/embed\\/)(.*)");
  3. if(!EMBED_PATTERN.matcher(webURL.getPath()).matches()){
  4. return "";
  5. } else {
  6. return EMBED_PATTERN.matcher(webURL.getPath()).replaceAll("$2");
  7. }
  8. }

代码示例来源:origin: biezhi/java-library-examples

  1. String url = page.getWebURL().getURL();
  2. String domain = page.getWebURL().getDomain();
  3. String path = page.getWebURL().getPath();
  4. String subDomain = page.getWebURL().getSubDomain();
  5. String parentUrl = page.getWebURL().getParentUrl();

代码示例来源:origin: tjake/stormscraper

  1. if (pageTracker.getIfPresent(curURL.getURL()) != null && (!curURL.getPath().equals("/") && depth != 0))

相关文章