Package org.htmlparser.filters

Examples of org.htmlparser.filters.AndFilter


      if (categories == null) {
       
      try {
        parser.setURL(BROWSE_CATEGORIES_URL);
 
        NodeFilter categoryFilter = new AndFilter(
            new HasAncestorFilter(new HasAttributeFilter("id", "genres")),
            new NodeClassFilter(LinkTag.class)
        );
 
        NodeList categoryNodes = parser.extractAllNodesThatMatch(categoryFilter);
View Full Code Here


  }
 
  private void parseShippedList(Node queue, List<MovieItem> items) {
    NodeFilter discFilter = new CssClassFilter("or");
    NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
        new AndFilter(new NodeClassFilter(LinkTag.class),
            new HasParentFilter(new CssClassFilter("qt"))),
        new AndFilter(new NodeClassFilter(ImageTag.class),
            new CssClassFilter("star")),
        new CssClassFilter("ec"),
        new CssClassFilter("e"),
        new CssClassFilter("ee")
        });
View Full Code Here

  }
 
  private void parseMovieQueue(Node queue, List<MovieItem> items) {
    NodeFilter discFilter = new CssClassFilter("bd");
    NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
        new AndFilter(new NodeClassFilter(LinkTag.class),
            new HasParentFilter(new CssClassFilter("stc"))),
           
        new AndFilter(new NodeClassFilter(ImageTag.class),
            new CssClassFilter("star")),
           
        new CssClassFilter("ec"),
        new CssClassFilter("e")
        });
View Full Code Here

              log.info("Browsing... page=" + page + ",category=" + category);
          }
     
      parser.setURL(BROWSE_CATEGORY_URL + category.getId() + "&pageNum=" + page);
 
      NodeFilter discFilter = new AndFilter(
          new NodeClassFilter(TableRow.class),
          new HasChildFilter(new HasChildFilter(new CssClassFilter("list-title")))
      );
     
 
      NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
          new AndFilter(new NodeClassFilter(LinkTag.class),
              new HasParentFilter(new CssClassFilter("list-title"))),
          new CssClassFilter("list-titleyear"),
          new CssClassFilter("list-mpaa"),
          new AndFilter(new NodeClassFilter(ImageTag.class),
              new CssClassFilter("star"))
          });
 
      NodeList discs = parser.extractAllNodesThatMatch(discFilter);
 
View Full Code Here

          }
     
          String url = MessageFormat.format(SEARCH_URL, URLEncoder.encode(query, "UTF-8"), start);
      parser.setURL(url);

      NodeFilter discFilter = new AndFilter(
          new NodeClassFilter(TableRow.class),
          new HasChildFilter(new HasChildFilter(new CssClassFilter("searchDisplay")))
      );
     
      NodeCollector searchCollector = new NodeCollector(new NodeFilter[] {
          new CssClassFilter("activeTab"),
          discFilter,
      });
     
 
      NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
          new AndFilter(new NodeClassFilter(LinkTag.class),
              new HasParentFilter(new CssClassFilter("searchDisplay"))),
          new AndFilter(new NodeClassFilter(Span.class),
              new HasParentFilter(new CssClassFilter("searchDisplay"))),
          new AndFilter(new NodeClassFilter(ImageTag.class),
              new CssClassFilter("star"))
          });
 
      parser.extractAllNodesThatMatch(searchCollector);
      Node activeTab = searchCollector.getNode(0);
View Full Code Here

            }
     
            String url = MessageFormat.format(SEARCH_POPULAR_URL, URLEncoder.encode(query, "UTF-8"), start);
      parser.setURL(url);

      NodeFilter discFilter = new AndFilter(
          new NodeClassFilter(TableRow.class),
          new HasChildFilter(new HasChildFilter(new CssClassFilter("searchDisplay")))
      );

      NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
          new AndFilter(new NodeClassFilter(LinkTag.class),
              new HasParentFilter(new HasParentFilter(new CssClassFilter("searchDisplay")))),
          new AndFilter(new NodeClassFilter(TextNode.class),
              new HasParentFilter(new CssClassFilter("searchSmallText"))),
          new AndFilter(new NodeClassFilter(ImageTag.class),
              new CssClassFilter("star"))
          });

      NodeList discs = parser.extractAllNodesThatMatch(discFilter);
View Full Code Here

      if (log.isDebugEnabled()) {
        log.debug("Adding movie at url " + url);
      }
      parser.setURL(url);

      NodeFilter discFilter = new AndFilter(
        new CssClassFilter("disc"),
        new HasChildFilter(new HasChildFilter(
            new HasAttributeFilter("href", "/catalog/movieDetails/" + item.getMovieId())))
      );
     
      NodeFilter removeFilter = new AndFilter(
          new NodeClassFilter(LinkTag.class),
          new CssClassFilter("bvr-qremove")
      );

      NodeList discNodes = parser.extractAllNodesThatMatch(discFilter);
View Full Code Here

           
            parser.setInputHTML((String)props.get("responseBody"));
           
            NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
                    new CssClassFilter("boxart"),
                    new AndFilter(
                            new HasAncestorFilter(new CssClassFilter("detailDescription")),
                            new NodeClassFilter(TextNode.class)),
                    new AndFilter(
                            new HasAncestorFilter(new CssClassFilter("detailSpecs")),
                            new CssClassFilter("movieInfo"))
            });
            NodeList all = parser.extractAllNodesThatMatch(infoCollector);
View Full Code Here

                log.debug("Loading movie details at " + url);
            }
            parser.setURL(url);

            NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
                    new AndFilter(
                            new HasParentFilter(new HasAttributeFilter("href",
                                    "/catalog/movieDetails/" + item.getMovieId())),
                            new NodeClassFilter(ImageTag.class)
                    ),
View Full Code Here

  private void parseMovieQueue(Node queue, List<MovieItem> items) {
    NodeFilter discFilter = new CssClassFilter("disc");

        NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
                new CssClassFilter("bvr-qremove"),
                new AndFilter(new NodeClassFilter(LinkTag.class),
                        new HasParentFilter(new CssClassFilter("title"))),
                new CssClassFilter("mpaa"),
                new CssClassFilter("bvr-rating"),
                new AndFilter(new NodeClassFilter(LinkTag.class),
                        new CssClassFilter("availability")),
                new CssClassFilter("shipped"),
                new CssClassFilter("arrival")
        });
   
View Full Code Here

TOP

Related Classes of org.htmlparser.filters.AndFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.