public class ImageDescRemover extends NodeRemover {
public List<HTMLNode> removeDesc(HTMLNode root) {
List<HTMLNode> values = new ArrayList<HTMLNode>();
HTMLText textUtils = new HTMLText();
List<HTMLNode> images = nodeUtil.search(root, Name.IMG);
for(int i = 0; i < images.size(); i++) {
HTMLNode image = images.get(i);
HTMLNode parent = searchUpper(image, Name.TABLE);
if(parent != null) {
textUtils.searchText(values, handleTable(parent, image));
// addValues(handleTable(parent, image), values);
continue;
}
parent = searchUpper(image, Name.DIV, Name.CENTER);
if(parent != null) {
if(isValidText(parent, 3)) {
textUtils.searchText(values, parent);
// addValues(parent, values);
}
}
}