Package com.rarchives.ripme.ripper.rippers

Examples of com.rarchives.ripme.ripper.rippers.ImgurRipper


        passURLs.add(new URL("http://imgur.com/r/nsfw_oc/new"));
        passURLs.add(new URL("http://imgur.com/r/nsfw_oc"));

        for (URL url : passURLs) {
            try {
                ImgurRipper ripper = new ImgurRipper(url);
                assert(ripper.canRip(url));
                deleteDir(ripper.getWorkingDir());
            } catch (Exception e) {
                fail("Failed to instantiate ripper for " + url);
            }
        }
    }
View Full Code Here


        contentURLs.add(new URL("http://imgur.com/r/nsfw_oc/top/all"));
        */
        contentURLs.add(new URL("http://imgur.com/a/bXQpH"));
        for (URL url : contentURLs) {
            try {
                ImgurRipper ripper = new ImgurRipper(url);
                ripper.rip();
                assert(ripper.getWorkingDir().listFiles().length > 1);
                deleteDir(ripper.getWorkingDir());
            } catch (Exception e) {
                fail("Error while ripping URL " + url + ": " + e.getMessage());
            }
        }
    }
View Full Code Here

        failURLs.add(new URL("http://imgur.com/image"));
        failURLs.add(new URL("http://imgur.com/image.jpg"));
        failURLs.add(new URL("http://i.imgur.com/image.jpg"));
        for (URL url : failURLs) {
            try {
                new ImgurRipper(url);
                fail("Instantiated ripper for URL that should not work: " + url);
            } catch (Exception e) {
                // Expected
                continue;
            }
View Full Code Here

TOP

Related Classes of com.rarchives.ripme.ripper.rippers.ImgurRipper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.