import java.util.function.Predicate
import java.util.regex.Matcher
import java.util.regex.Pattern

class FindBareTags {
    private static final Pattern TITLE_PATTERN = Pattern.compile("\"title\": \"([^\"]+)\"")
    private static final Pattern HEADER_PATTERN = Pattern.compile("==\\{\\{header\\|([^}]+)}}==")
    private static final Predicate<String> BARE_PREDICATE = Pattern.compile("<lang>").asPredicate()

    static String download(URL target) {
        URLConnection connection = target.openConnection()
        connection.setRequestProperty("User-Agent", "Firefox/2.0.0.4")

        InputStream is = connection.getInputStream()
        return is.getText("UTF-8")
    }

    static void main(String[] args) {
        URI titleUri = URI.create("http: