Simple Search on Google Images

This will retrieve a series of URL's, and send them to terminal output. These URL's are for pages that meet the search criteria "Hawaii" on Google Image Search.

import java.util.*;
import java.io.*;
import java.net.*;

import Torello.HTML.*;
import Torello.HTML.NodeSearch.*;
import Torello.Java.*;

public class GoogleImagesTest
{
    private static final int LEN = "https://www.google.com/url?q=".length();

    public static void main(String[] argv) throws Exception
    {
        String urlStr = "https://www.google.com/search?tbm=isch&q=hawaii";
        URL url = new URL(urlStr);
        Vector<HTMLNode> page = HTMLPage.getPageTokens(url, false);

        // <div class="med" id="res" role="main">
        Vector<HTMLNode> res = InnerTagGetInclusive.first(page, AVT.cmp("id", TextComparitor.EQ_CI, "res"), "div");
        System.out.println("res.size() == " + res.size());
        Vector<TagNode> anchors = TagNodeGet.all(res, TC.OpeningTags, "a");
        Vector<URL> links = Links.resolveHREFs(anchors, url);
        for (URL u : links)
            if (u != null)
            {
                String s = Escape.replaceAll(URLs.urlToString(u).substring(LEN));
                int pos = s.indexOf("&");
                System.out.println(StringParse.setChar(s, pos, '?'));
            }
    }
}


res.size() == 365
https://www.afar.com/magazine/why-this-year-is-the-best-time-to-visit-hawaii?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IFjAA&usg=AOvVaw1-JGaKzJoIrG_5KFaJ-Tvo
https://www.classicvacations.com/hotels/hawaii?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IGDAB&usg=AOvVaw2odASl1aSJlgjoTfHv_VK_
https://www.gohawaii.com/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IGjAC&usg=AOvVaw1pf1Uz_yu4mOXhyzkfJvxQ
https://www.escape.com.au/destinations/north-america/usa/hawaii/7-things-you-never-knew-about-hawaii/news-story/045af552e4c2846dc1bc34a68bd3271e?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IHDAD&usg=AOvVaw3MVjU0Sfm7n2LDrPUmtCei
https://www.hawaii.com/events/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IHjAE&usg=AOvVaw2IMNkSZv_JaJxblh6H8Wzu
https://travel.padi.com/d/hawaii/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IIDAF&usg=AOvVaw2zk7I90nFplkI2lyCYMJc-
https://www.travelinglifestyle.net/best-hostels-hawaii-backpackers/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IIjAG&usg=AOvVaw3EITYTzT7upAMu8gKDXy3e
https://www.tripsavvy.com/hawaii-4139605?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IJDAH&usg=AOvVaw0qIEUaVYocV_4vKfCaab6F
https://www.hawaii.com/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IJjAI&usg=AOvVaw2nksUqtFXtfSAQ30hD-lHQ
https://hawaiistateparks.org/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IKDAJ&usg=AOvVaw3wG_Wff7HfVgwYKiMD3wCo
https://www.visittheusa.com/state/hawaii?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IKjAK&usg=AOvVaw157pbLl3J-T1kF0zQuXqFY
https://www.fodors.com/world/north-america/usa/hawaii/experiences/news/40-ultimate-things-to-do-in-hawaii?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4ILDAL&usg=AOvVaw2s6rbv6cApa-y-BikrkcC5
https://kids.nationalgeographic.com/explore/states/hawaii/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4ILjAM&usg=AOvVaw24EfvCqk-KD2b4zAS3AkiN
https://www.escape.com.au/destinations/north-america/usa/hawaii/best-things-to-do-in-hawaii-for-a-girlsonly-holiday/news-story/e395b6c8c3cce0afa0ee9315d2428829?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IMDAN&usg=AOvVaw3vztd7_oh8OJl7UnlFN82c
http://www.prideofmaui.com/blog/maui/top-things-hawaii.html?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IMjAO&usg=AOvVaw2NCsVwl4e5oF6b8OXq_oEW
https://www.usatoday.com/story/travel/destinations/2019/04/11/hawaii-vacation-arbys-promotion/3437979002/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4INDAP&usg=AOvVaw26axXK1luvSrcVgXHvi2f_
https://www.nationalgeographic.com/travel/destinations/north-america/united-states/hawaii/?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4INjAQ&usg=AOvVaw39kNhWiIM6rs5H0_71NLE0
https://www.independent.co.uk/travel/americas/hawaii-guide-eight-islands-of-surfing-snorkelling-and-stunning-jurassic-world-scenery-10347731.html?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IODAR&usg=AOvVaw1GrQ_eRrIt-3wb-J2EMgZq
https://www.westjet.com/en-ca/book-trip/destination-guide/united-states/hawaiian-islands?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IOjAS&usg=AOvVaw3QaO8mpD2ovowC8BQfQ4k5
https://www.cntraveler.com/story/why-we-should-all-care-about-southwest-flying-to-hawaii?sa=U&ved=0ahUKEwi57uCyg5LiAhUJRa0KHckSD7oQwW4IPDAT&usg=AOvVaw2IfQIpYMzPhrHN6pqXskFo