static BufferedImage googleImageSearchFirst(S q) { S html = str(googleImageSearch_loadPage(q)); S id = regexpFirstGroup("\"id\":\"(..............):\"", html); if (id == null) null; print("ID: " + id); S s = regexpFirstGroup("[\"" + id + ":\",\"data:image/jpeg;base64,([^\"]+)", html); if (s == null) null; try { ret decodeImage(base64decode(unquote("\"" + s + "\""))); } on fail { print("Tried to decode: " + quote(s)); } }