class TwitchVideoRipper extends VideoRipper {

    private static final String HOST = "twitch";

    public TwitchVideoRipper(URL url) throws IOException {
        super(url);
    }

    @Override
    public String getHost() {
        return HOST;
    }

    @Override
    public boolean canRip(URL url) {
        Pattern p = Pattern.compile("^https://clips\\.twitch\\.tv/.*$");
        Matcher m = p.matcher(url.toExternalForm());
        return m.matches();
    }

    @Override
    public URL sanitizeURL(URL url) throws MalformedURLException {
        return url;
    }

    @Override
    public String getGID(URL url) throws MalformedURLException {
        Pattern p = Pattern.compile("^https://clips\\.twitch\\.tv/(.*)$");
        Matcher m = p.matcher(url.toExternalForm());
        if (m.matches()) {
            return m.group(m.groupCount());
        }

        throw new MalformedURLException(
                "Expected Twitch.tv format:"
                        + "https://clips.twitch.tv/####"
                        + " Got: " + url);
    }

    @Override
    public void rip() throws IOException {<FILL_FUNCTION_BODY>}
}

        LOGGER.info("Retrieving " + this.url);
        Document doc = Http.url(url).get();
        
        //Get user friendly filename from page title
        String title = doc.title();
        
        Elements script = doc.select("script");
        if (script.isEmpty()) {
            throw new IOException("Could not find script code at " + url);
        }
        //Regex assumes highest quality source is listed first
        Pattern p = Pattern.compile("\"source\":\"(.*?)\"");
        
        for (Element element : script) {
            Matcher m = p.matcher(element.data());
            if (m.find()){
                String vidUrl = m.group(1);
                addURLToDownload(new URL(vidUrl), HOST + "_" + title);
            }
        }
        waitForThreads();
    
<methods>public boolean addURLToDownload(java.net.URL, java.io.File) ,public boolean addURLToDownload(java.net.URL, java.io.File, java.lang.String, Map<java.lang.String,java.lang.String>, java.lang.Boolean) ,public void downloadCompleted(java.net.URL, java.io.File) ,public void downloadErrored(java.net.URL, java.lang.String) ,public void downloadExists(java.net.URL, java.io.File) ,public java.lang.String getAlbumTitle(java.net.URL) ,public int getCompletionPercentage() ,public abstract java.lang.String getGID(java.net.URL) throws java.net.MalformedURLException,public abstract java.lang.String getHost() ,public java.lang.String getStatusText() ,public abstract void rip() throws java.io.IOException,public java.net.URL sanitizeURL(java.net.URL) throws java.net.MalformedURLException,public void setBytesCompleted(int) ,public void setBytesTotal(int) ,public void setWorkingDir(java.net.URL) throws java.io.IOException<variables>private int bytesCompleted,private int bytesTotal